Skip to main content

Full text of ""

See other formats


MSCCN MACRO MllOB U-DEC-77 10. A4 PAGE 6 
RENEW AND CIZE COMMANOr. 



.SBTTL RENEW AND SIZE COWANDS 



19A 000526 








; SERVICE A RENEW REQUEST 




004167 


OOOOOOG 




RENEW:: 


JSR 


R1.GETPNM 


GET ARGUMENT (RETURNfcO IN R1> 


195 000532 








RENEW1 : 


:PUSH 


R1 


GET SET TO WRITE AND READ 'V TIMES 


196 00053A 


004067 


OOOOOOG 




• *: 


JSR 


RO, WRITES 


WRITE OUT CURRENT BUFFER 


197 0005A0 


016767 


OOOOOOG OOOOOOG 




MOV 


PAGE .NUMBER 


SAVE CURRENT PAGE # 


198 0005A6 


004067 


OOOOOOG 






JSR 


RO, READS 


READ IN A NEW ONE 


199 000552 


000411 








BR 


IS 


EOF RETURN 


200 00055A 


105767 


OOOOOOG 






TS1B 


SSW2 


PAGP COMMAND? 


201 000560 


001404 








BEQ 


20S 


IF EQ NO 


202 000562 


02*767 


OOOOOOG OOOOOOG 




CMP 


PAGE .NUMBER 


■PAGE NUMBER CHANGE? 


203 000570 


001761 








BEQ 


10S 


-IF EQ NO 


20A 000572 


005316 






20S: 


DEC 


(SP) 


ANY MORE PAGES/BUFFERS TO PROCESS? 


205 00057A 


003357 








BGT 


10S 


IF GT YES 


206 000576 








IS: 


POP 


R1 


RESTORE R1 


?07 000600 








RENEW2: 


PUSH 


PAGE 


TELL USER WHAT PAGE THIS IS 


<% 000604 










PUSH 


#PA6ECU 




209 000610 


004767 


0000006 






JSR 


PC. C VTA 




210 0006U 


012700 


OOOOOOG 






MOV 


«PAGECU.R0 


NULL LEADING ZEROS 


211 000620 


122027 


000060 




4S: 


CMPB 


(R0)t.#60 




212 00062A 


001004 








BNE 


3S 




213 000626 


112760 


000040 


\77777 




MOVB 


«40.-1(R0) 




2H 00063A 


000771 








BR 


4S 




21 '> 000636 


122767 


000040 


000004G 


3S: 


CMPB 


#40.PAGECU»4 


IF ENTIRE NUMBER IS NUL. 


216 0006AA 


001003 








BNE 


5S 


INSERT A ZERO. 


217 000646 


112767 


000060 


000004G 




MOVB 


«60.PAGECU^4 




218 000654 


004067 


OOOOOOG 




5S: 


JSR 


RO, TYPED 




219 000660 


OOOOOOG 








CPAGE 






220 000662 


105767 


OOOOOOG 






TSTB 


SSW2 


PAGE REQUESTED? 


221 000666 


001025 








BNE 


PAGE1 


YeS 


222 000670 
22? 
22i> 
225 

226 000672 


000207 








RETURN 


\ 










; SERVi 


CE SIZE 


REQUEST 




004167 


OOOOOOG 




SIZE:: 


JSR 


RI.GETPN.'^ 


GET ARGUMENT (RETURNED IN R1) 


227 000676 


010167 


OOOOOOG 






MOV 


R1.SIZEBF 


SAVE ARGUMENT 


228 000702 


000207 








RETURN 







•«•• I \ •«•« 



M»CM MACRO M110H 14-DEC-77 10:44 PAGE 7 



OOOOOOG 
OOOOOOG 
OOOOOOG 
OOOOOOG 



OOOOOOG 
OOOOOOG 

OOOOOOG 
OC >000G 



OOOOOOG 
OOOC .JO 



MSCCM MACRO Ml 108 U-DEC-77 10: AA PAGE 7 

PAGE AhN) TOP OF FILE COMMANDS 

230 
231 
232 
233 

23<. 00070A 00A^67 

235 000710 105207 

236 0007U 10526>' 

237 000720 166701 

238 00072A 00U06 

239 000726 003301 
2A0 000730 066701 
2A1 00073A 012700 
2A2 0OO7A0 000A20 
2A3 0007A2 00A767 
2AA 0007A6 00A167 
2A5 000752 005702 
2A6 00075A 001 A05 
2A7 000756 105267 
2A8 000762 010200 
2A9 00076A 000177 
250 000770 000207 
251 
252 
253 
25A 000772 012701 

255 000776 012700 

256 001002 010167 

257 001006 112767 

258 001 01 A 052767 

259 J01022 000167 



.SBTTL PAGE AND TOP OF FILE COMMANDS 



SERVICE PAGE REQUEST 



PAGEC:: JSR 
INCB 
INCB 
SUB 
BEQ 
BGT 
ADD 
MOV 
BR 
CALL 
JSR 
TST 
BEO 
INCB 
MOV 
JMP 
RETURN 



PAGE1: 



10$: 



R1.GETPNM 

SSW2 

SBLKON 

PAGE.RI 

PAGE1 

RENt'WI 

PAGE.R1 

UrOLDMACRO 

T0F1 

TOPS 

RI.GETPNM 

R2 

10S 

SSW'I 

R2,R0 

aNXT8 



GET ARGUMENT (RETURNED IN R1) 

INDICATE A PAGE OPERATION 

MAKE SURE WE'RE IN BLOCK ON MODE 

CALCULATE * OF PAGES FROM HERE 

WE'RE ALREADY HERE 

USE RENEW NOW TO GET THE DESIRED PAGE 

RECALCULATE PAGE NUMBER 

GET ADDRESS OF OLDPAGE MACRO 

TOP THE BLOCK BUFFER 

DO AN NP REQUEST NOW IF IT WAS 

IF NONE WAS GIVEN, IGNORE THIS 

SET PRINT REQUEST 
FOR NEXT COMMAND 



0C0001 
OOOOOOG 
OOOOOOG 

0000A6 OOOOOOG 
OOOOOOG OOOOOOG 
OOOOOOG 



SERVICE A TOF REQUEST (TOP OF FILE) 



TOF:; 
T0F1: 



MOV 

MOV 

MOV 

MOVB 

BIS 

JMP 



#1.R1 

(TTOKFIL.RO 

R1 ,NARG 

#'i,CAT£N 

*MAC0P.SW2 

EDITSA 



TOF ALWAYS READS IN PAGE 1 

GET ADDRESS Or MACRO STRING 

SAVE MACRO ARG. 

SET STANDARD CONCATENATION CHARACTER 

SET MACRO IN PROGRESS 

EXECUTE MACRO NOW 



•••• C 1 •••* 



MSCCM MACRO M1108 1A-DEC-77 lOiAA PAGF 9 



nSCCM MACRO M1108 
9EAD/WRITE COMMANDS 



262 
263 
26A 
265 

266 001026 

267 001032 

268 001036 

269 001042 

270 001 OAA 
001050 
001052 



U-DEC-77 10:AA PAGE 9 



271 
272 
273 
27A 
175 

276 00'I05A 

277 001060 



0OA167 OOOOOOG 

01016** OOOOOOG 

00A06> OOOOOOG 

0OOA03 

005367 OOOOOOG 

003372 

000207 



00A067 OOOOOOG 
000207 



.SBTTL READ/WRITE COMMANDS 
READ A PAGE FROM INPUT DEVICE INTO BLOCK BUFFER 
READ 



IS: 



2S: 



JSR 

MOV 

JSR 

BR 

DEC 

BGT 

RETURN 



R1.GETPNM 

R1 .NUMBER 

RO.READS 

2S 

NUMBER 

IS 



GET ARGUMENT (RETURNED IN R1) 

SAVE ARG 

CALL "READ" SUBROUTINE 

EOF ENDS READ 

ALL DONE? 

NO: GET ANOTHER PAGE IN 



WRITE N LINES FROM BLOCK BUFFER TO OUTPUT DEVICE 



WRITE: 



JSR 
RETURN 



RO, WRITES 



.•CALL 'VRITE" SUBROUTINE 



•••t D 1 •••• 



MSCCM MACRO W1108 U-DEC-77 10:A4 PAGE 10 



1 



NSCCH MACRO mi 08 U-DEC-77 10:A4 PAGE 10 
ON/OFF SWITCH PROCESSOR 



279 
280 
281 
282 

283 001062 016700 OOOOOOG 

284 001066 105710 

285 001070 00U2A 

286 001072 U2710 OOCOAO 

287 001076 122720 000117 

288 001102 001022 

289 OO'IOA U2710 000040 

290 001110 122710 000116 

291 0011U 00H12 

292 001116 122720 000106 

293 001122 001012 

29A 001124 U2710 OOOOAO 

295 001130 122720 000106 

2% 001134 001005 

297 001136 105011 

298 001140 000207 

299 001142 112711 000001 

300 001146 000207 

301 001150 000167 0000006 



.SBTTL ON/OFF SWITCH PROCESSOR 



PROCESS ON/OFF SWITCH IN COMMAND STRING 



ONOFF: 



IS: 
20S: 



MOV 

TSTB 

BEQ 

BICB 

CMP6 

BNE 

BICB 

CMP6 

BEQ 

CMPB 

BNE 

BICB 

CMPB 

BNE 

CLRB 

RETURN 

MOVB 

RETURN 

JMP 



CWDS.RO 

(RC) 

IS 

#40. (RO) 

#'0,(R0)* 

20S 

#40, (RO) 

»'N.(RO) 

IS 

*'F.(RO;* 

20S 

#40. (RO) 

**F.(RO)* 

20S 

(R1) 

#1.(R1) 

ILLCD 



;GET NEXT WORD 

;IF NO ARGUMENT WAS GIVEN, ASSUME "W" 

CONVERT TO UPPER CASE 
FIRST LETTER MUST BE AN 'tl" THEN 
NO: ILLEGAL COMMAND 
CONVERT TO UPPER CASE 
NEXT LETTER IS EITHER AN "H" OR 'T" OR 
ITS ILLEGAL. 

.•NEITHER N OR F 

.-CONVERT TO UPPER CASE 

;NEX1 LETTER MUST ALSO BE AN "F" 

.•TURN FLAG OFF 

; RE TURK 

.•TURN TLAG ON 

; RETURN 

; ILLEGAL COMMAND 



•*•• E 1 ,>«*« 



MSCCM MACRO Ml 108 U-DEC 

cwtT &ut\ ri ncc rnnMAkinc 



•77 10:44 PAGE 11 



HSCCM MACRO Ml 108 U-DEC-77 10: W 
EXIT AND CLOSE COMMANDS 



303 

30A 

305 

306 

307 001 15A 

308 

309 

310 

311 001160 

312 001 16A 
313 

3U 

315 

316 001166 

317 

318 

319 

320 

321 001172 

322 001176 



05271A OOOOOOG 



052715 OOOOOOG 
000A02 



05271A OOOOOOG 



052715 OOOOOOG 
000177 OOOOOOG 



PAGE 11 

.SBTTL EXIT AND CLOSE COMMANDS 

; THIS ALLOWS THE USER TO DELETE THE INPUT FILE WHEN HE EXITS 

EXD:: BIS #DELINP.(RA) ;SFT DELETE SWITCH 

; SERVICE AN EXIT REQUEST 

EXIT:: BIS #EXIT0P.(R5^ .-INDICATE AN EXIT IS DESIRED FOLLOWING 
BR CLOSE 



THIS ALLOWS THE USER TO DELETE THE INPUT FILE WHEN HE CLOSES 
CLD:: BIS #DELINP,(RA) 



SERVICE A CLOSE REQUEST 



CLOSE:: BIS 
JMP 



#CL0P.(R5) 
aeOTTOO 



;SET DELETE SWITCH 
A CLOSE. 



.-INDICATE A COMPLETE CLOSE IS 
; REQUESTED. 



*•*• f ) *««• 



MSCCM MACRO M1108 U-DEC-77 lO:^ PAGE 12 
CD e« kiii\ kill rniMiiifi' 



MSCCW MACRO MIIOB U-DEC-77 10:AA 
SP. SS AND KILL COMMANDS 



32A 
325 
326 
327 

328 001202 

329 001206 
330 

331 

332 

333 001210 

33A 001 2U 

335 001216 

336 001222 

337 001 22A 

338 001230 
339 

3A0 

3A1 

342 001234 

3A3 001 2*A 

3A4 0ni25A 



3A5 
346 



042715 OOOOOOG 
000207 



032715 0000006 

001 A03 

052715 OOOOOOG 

000207 

012700 OOOOOOG 

000167 OOOOOOG 



000177 OOOOOOG 
000001 



PAGE 12 

.SBTTL SP, SS AND KILL COMMANDS 

SERVICE A SP REQUEST (SELECT PRIMARY) 

SELP:: BIC *SS0N,(R5) ;SELECT PRIMARY INPUT 
RETURN : 

SERVICE A SS REQUEST (SELECT SECONDARY) 

SELS 



BIT 
BEQ 
BIS 
RETURN 
lOSi MOV 
JMP 



«SEC0PN,(R5) 

10S 

/rSS0N.(R5) 

/mSG16.R0 
ILLCMD 



SERVICE A KILL REQUEST 

KILL:: CLOSES «INPBLK 
DELETt «0UTBLK 
JMP 8START 

.END 



SECONDARY FILE MUST BE OPEN 

NO: TELL USER 

SELECT SECONDARY INPUT 

SET ADDRESS OF ERROR MESSAGE 
OUTPUT ERROR MESSAGE 



CLOSE INPUT AND OUTPUT FILES 



t**t G 1 t««« 



MSCCM MACRO M*108 U-DEC-77 10:44 PAGE 12-1 



cwHbru T&IM C 



nsccn MACRO nii08 

SYMBOL TABLE 



U-DEC-77 lOiAA PAGE 12-1 



BLOCK 
BOTT00= 
CATEN = 
CC 
CC1 
CLO 

CLOP = 
CLOSE 
CQNCAT= 
CPAGE - 
CUimAC= 
CVTA = 

cyos - 

DELINP= 
EDITSS= 
EDITSA= 
ENDCM > 
EXD 



OOOOOORG 

****** QX 
****** QX 

0001 22RG 
00OU6R 
001166RG 
****«« Gx 

001172R6 

****** GX 

****** GX 

****** 

****** 

****** 

****** 

****** 

****** 

•**♦** 



cx 

GX 
GX 
GX 
GX 
GX 
GX 



00115ARG 



EXIT 

EX1T0P= 

GETNUn= 

GETPNM= 

ILLBLK= 

ILLCD = 

ILLCMO= 

ILLN 

IMEDMC 

IMMAC = 

INPBLKs 

KILL 

LtSIZEs 

MACARG- 

MACBUF= 

MACOEF= 

NACERR= 

MACMSG^ 



001160RG 



GX 
GX 
GX 



****** 
****** 
****** 
****** GX 
****** GX 
****** GX 
000424R 
0001 50RG 
****** GX 
****** GX 
00123ARG 
000206 
****** GX 
****** GX 
****** GX 
****** GX 
****** GX 



MACOP = 

MACRO 

MAC.IOD 

MAC001 

NAXMAC' 

MSG10 = 

MSG16 = 

NARG = 

NUMARG- 

NUMBER- 

NXT8 =: 

OLDCWD- 

OLDMAC= 

ONOFF 

OUTBLK= 

OUTSW 

PAGE = 

PAGEC 



****** GX 
OOOAOORG 
0001 72RG 
00020AR 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 



****** 

****** 
****** 

****** 
****** 
****** 
****** 
****** 
****** 

001062R 
****** GX 

00005ARG 

****** GX 
00070ARG 



. ABS. 000000 OCO 
001260 001 
ERRORS DETECTED: 

VIRTUAL MEMORV USED: 1085 WORDS ( 5 PAGES) 
DYNAMIC MEMORV: 157AA WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:16 

C37,203MSCCM,C37,30]MSCCM/-SP«C37,1O3EDPRE,MSCCM 
C' M 



PAGECU= 

PAGE1 

PARSSS= 

READ 

rSADS ^ 

RENEW 

RENEW1 

RENEW2 

SECOPN= 

SELP 

SELS 

SIZE 

SIZEBF= 

SSON = 

START = 

SW2 = 

TAB 

TEMPI • 



****** GX 
0007A2R 
000027 
001026RG 

****** GX 

000526RG 
000532RG 
000600R 

****** GX 

001202RG 
001 21 ORG 
000672RG 
****** GX 
****** GX 
****** GX 
****** GX 
000076RG 
****** GX 



TOF 

T0FFI'.= 

T0F1 

TOPS = 

TYPED = 

UPCAS 

VERIFY 

WRITE 

WRITES: 

SBLKON^ 

$OUTON= 

SSWI = 

SSW2 = 

STABONs 

$UPPER= 

SVON = 

.CLOSE= 

.DELET= 



00C772RG 

****** GX 

001002R 

****** GX 
****** GX 
0001 OARG 
0001 12RG 
00105ARG 

*»** GX 

***ft GX 

**** 

**** 

**** 



**•* 
**•* 



GX 

GX 

GX 

GX 

GX 

GX 

G 

G 



••*• H 1 *•** 




•t** I ] ••«* 



OPCLS MACRO Ml 108 U-DEC-77 10:<i<i PAGO i 



OPCLS MACRO M1108 lA-DEC-77 10:4A PAGE 2 



47 000000 

48 000004 

49 000010 

50 000012 
" 000016 

000020 
000024 

54 000050 

55 000036 

56 QQQQ62 



51 
52 
53 



012700 
032715 
001005 
004767 
103004 
012700 
000167 
152767 



.TITLE OPCLS 
. I DENT /M05/ 



COPYRIGHT (C) 1976 

DIGITAL EQUIPMENT CORPORATION. MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A 
S.NGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE INCLU- 
SION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE. OR ANY 
OTHER COPIES THEREOF. MAY NOT 3E PROVIDED OR OTHERWISE MADE 
AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH SYSTEM 
AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE TO AND 
OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC. 

THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

:LC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS 
SOFTWARE ON EQUIPMENT WHICH I?. NOT SUPPLIED BY DEC. 

VERSION M05 

RICHARD HULLY 1-N0V-71 

MODIFIED BY: 



OOOOOOG 
OOOOOOG 

OOOOOOG 

OOOOOOG 
OOOOOOG 
OOOOOOG OOOOOOG 



388SSI mi m 



»000G 
)00OG 



R. MCLEAN 1 -MAR- 73 

E. R. GORDON 1-OCT-73 

E. R. GORDON 1-MAR-74 

D. N. CUTLER 21-APR-74 

D. N. CUTLER 25-DEC-75 

D. N. CUTLER 25-JUL-76 

OPEN/CLOSE SECONDARY FILE FUNCTIONS 

MACRO LIBRARY CALLS 

.MCALL CLOSES. OPENSR 

SERVICE AN OPENS REQUEST 



OPENS:: MOV #SECOND.R0 .-ASSUME TWO SECONDARY FILES SPECIFIED 

BIT #SEC0PN.(R5) .-SECONDARY FILE AiriEAOY OPENED? 

BNE 0PENS4 ;ir NE YES 

CALL PSAVF ;PARSF SECONDARY FILE SPECIFIER 

BCC 0PENS2 .SUCCESSFUL RETURN 

0PENS3: MOV #.FCS54.R0 ; ILLEGAL flLE NAME 

0PfcKS4: JMP ILLCMO 

0PEN:i2: B1S6 #OPENB.ER.EXT ,-SET OPEN SWITCH 

OPENIR fSECBLH....... ERROR .OPEN SECONDARY FILE 

CLRB ER.EXT .-CLEAR FLAG 

BIS «SEC0PN.(R5) .INDICATE SECONDARY FILE IS OPEN 



*tt* J t •••• 



OPCLS MACRO MllOa U-DEC-77 10:44 PAGE 2-1 



OPCLS MACRO mi 08 U-DEC-77 10:AA PAGE 2-1 

5e 00072 000207 RETURN 

; SERVICE A CLOSES REQUEST 
61 

62 00007A 032715 OOOOOOG CLOSES:. BIT «SEC0PN,(R5) ; SECONDARY FILE MUST BE OPEN 

63 000100 001003 BNE CLOSE 1 .YES 

64 000102 012700 OOOOOOG CL0SE2: MOV 4mSG16,R0 :N0 INPUT FILE OPEN. TELL USER 

65 000106 0007A6 BR 0PENS4 

66 000110 CL0SE1: CLOSES #SECBLK .CLOSE FILE 

67 000120 0A2715 OOOOOOC BIC «SEC0PNISS0N.(R5) .-CLEAR SWITCHES ALSO 

68 000124 000207 RETURN ; 
69 

70 000001 .END 



•••t K t •««• 



OPCLS MACRO M1108 U-DfC-77 10i44 PAGE 2-2 
SYMBOL TABIC 



OPCLS MACRO mi08 
SYI«OL TABLE 



CLOSES 
CLOSE 1 
CL0SE2 
ER.EXT= 
FO.RO = 

. ABS. 



000074RG 
000110R 
0001 02R 
****** GX 
****** GX 



U-OEC-77 10: AA PAGE 2-2 



F.FACC= ♦•♦»♦♦ GX 
ILLCW)= ♦♦»**• GX 
L$S1ZE= 000206 
MSG16 = *•♦*•• GX 
OPENS - •♦*♦•• GX 



OPENS OOOOOORG 
0PENS2 000030R 
0PENS3 000020R 
OPENSA 00002AR 
PAR$SS= 000027 



PSAVF = •♦*••• GX 
SECBLK= «♦»•** GX 
SEC0N0= ♦••*•♦ GX 
SECOPN= ••«••* GX 
SSON = ••*•** GX 



$$$n = 000067 

.CL0SE= *♦•*♦♦ G 

.ERR0R= *•***• GX 

.FCS5A= ••*•** GX 

.OPEN = ****** G 



000000 UOO 
000126 001 
ERRORS DETECTED: 

VIRTUAL »€«DRY USED: 1092 WORDS ( 5 PAGES) 
DVNAHIC MEftORY: 1!)7AA WORDS ( 60 PAGES) 
ELAPSED TIfE: 00:00:08 
C37,20]0PCLS. 137. 30]OPCLS/-SP=L37.101EDPRE. OPCLS 



•••• I } tttt 




««** H 1 ••«• 



[ 



SAVt NACiK) nnO« 14-DIC-77 lOiU PAGE 2 



SAVE MACRO MHOS U-DEC-77 10:AA PAGE 2 



.TITLE SAVE 
. I DENT /n06/ 



COPYRIGHT (C) 1976 

DIGITAL EQUIPMENT CORPORATION. MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A 
SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE INCLU- 
SION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE, OR ANY 
OTHER COPIES THEREOF. MAY NOT BE PROVIDED OR OTHERWISE MADE 
AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH SYSTEM 
AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE TO AND 
OWNERSHIP OF THE SOFTWAAE SHALL AV ALL TIMES REMAIN IN DEC. 

THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT EIE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 



DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF 
SOFTWARE ON EQUIPMENT dlHICH IS NOT SUPPLIED BY DEC. 

VERSION M06 

RKHARD HULt-Y 1-N0V-71 

MODIFIED BY: 

i R. MCLEAN 1-MAR-73 

; E. R. GORDON 1-0CT-73 
; E. R. GORDON 1-MAR-7A 
i D. N. CUTLER 21-APR-7A 

; D. N. CUTLFR 25-DFC-75 
D. N. CUTLER 19-JUL-76 



ITS 



SAVE FUNCTION 
MACRO LIBRARY CALLS 



.MCALL CLOSES. OPENIW. PUT* J 



47 000000 
4d OC0006 
«9 000012 
•iO 000016 

51 000022 

52 000024 

53 000052 
5* 000036 
^5 00004A 

56 000052 

57 000071 



SERVICE A SAVE REQUEST 



01. 767 OOOOOOG OOOOOOf, 

owl 67 OOOOOOG 

010167 OOOOOOG 

004767 OOOOOOG 

103003 

012767 OOOOOOG OOOOfOf 

012700 OOOOOOG 

1'6760 OOOOOOC 0000006 

152767 OnCOOOG OOOOOCG 

1050o7 0000006 



SAVE: 



10k: 



MOV 

JSR 

MOV 

CALL 

BCC 

MOV 

MOV 

MOVB 

BISB 

OPENIW 

ClR«J 



#INPDFN.SAVBLK»F.DrNB ;DON*T USt DEFAULT NAME 

RI.GETPNM .-GET ARG (RETURNED INR1) 

R 1 ""JTIBE R 

PSAVf" ; PARSE SAVE FILE SPECIFIER 

101 ;ir CC FILE SPECIFIED 

#SAVDFN.SAVBLIC*f .DFN8 .-RESTORE DEFAULT NAKi BLOlK 

«SAVBLK.RO 

OUIBLH*F.RATT,F.RATT(RO) .-PRESfRVE RECORD ATTRIBUTES 



«OPENB.ER.Exr 

R0.,,,...E.'"»OR 

ER.EXT 



.■SET SECONDARY FILE StflUH 
;OPEN OUTPUT FILE 
.-CLEAR SWITCH 



tt** M 1 •**• 



SAVE MACRO mi 08 H-OEC-77 lO-.AA PAGE 2-1 



58 000076 

59 C00104 

60 000106 

61 0001 U 

62 000120 

63 0001 2A 
6A 000130 

65 0001 3A 

66 000136 

67 OOOUO 

68 000166 

69 000172 

70 "101 7A 

71 V.J0200 
n 00020A 
73 000210 
7A 000212 
75 000230 
76 

77 



022760 OOOOOOG OOOOOOG 

00U03 

CM 6067 OOOOOOG OOOOOOC 

016702 0000006 20$: 

016201 OOOOOA 

062702 000006 

162701 000002 

100001 

005001 

005367 OOOOOOG 

003AC7 

00A067 OOOOOOG 

000167 000006 

004067 OOOOOOG 

0007A1 

00020/ 

000001 



30$: 



40$: 



CMP 

BEQ 

MOV 

MOV 

MOV 

ADD 

SIB 

BPL 

CLR 

PUT$S 

Df^ 

Bit 

JSR 

JMP 

JSR 

BR 

CL0S£$ 

RfTURN 

.END 



/riNPDFN.F ,DFNB(RO) ;DID WE USE DEFAULT NAME BLOCK 

20$ ;N0 

F.FVER(RO),SAVDFN^N.FVER .-PRESERVE VERSION NUMBER 

LAST,R2 ;GET ADDRESS OF CJRRENT LINE 

4(R2),R1 .-THE LINE SIZE 

«6,R2 .-THE REAL LINE BEGINNING 

#2,R1 .-DON'T INCLUDE CR LF 

30$ .-IF PL OKAY 

R1 .-DEFAULT TO ZERO Le'NGTH LINE 

«SAVBLK.R?.R1,. ERROR 

NUMBER .-MORE LINES TO SAVE? 

40$ :N0: CLOSe FILE AND RETURN 

RO. INPUT ;GET NEW LINE AND OUTPUT LAST 

40$ .'EOF CLOSES FILE 

RO.OUTPUT 

20i 

«SAVBLK.. ERROR .'CLOSE SAVE FILE 



••*• I 2 **** 



(AUF 



MAfRO MnOi 14-blC-77 10:44 PAGF?-? 



SAVE 


MACRO f 


11108 


SYMBOL 


TABLE 




ER.EXT= 


««**** 


GX 


FO.WRT= 


♦«♦♦♦♦ 


GX 


F.DFNB= 


*«*«** 


GX 


F.FACC= 


*«*•** 


GX 


F.FVER= 


****** 


GX 



F.NRBD= ♦♦♦*♦* G« 



ABS. 



U-OEC-77 10: AA PAGE 2-2 



F.RATT= *♦***• GX 
GETPNM= *»••♦♦ 6X 
1NP0FN= ♦*••♦♦ 6X 
INPUT = •♦*♦♦* GX 
LAST = ♦•*♦♦• GX 
L$S1ZE= 000206 



000000 000 
000232 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 1197 WORDS ( 5 PAGES) 
DYNAMIC MEMORY: 157AA WORDS ( 60 PAGES) 
Elapsed time: 00:00:08 
C37.20]SAVE.C37.30]SAVE/-SP=C37.10]EDPRE.SAVE 



NUMBER^ 


*< 


»**«* 


GX 


N.FVER= 


♦ ( 


k**** 


GX 


OPENB == 


*i 


***** 


G 


OUTBLK= 


*( 


»•**• 


GX 


OUTPUTS 


Dl 


»**** 


GX 



PARStt- 000027 
PSAVF = ****** GX 
SAVBIK= *♦•••* GX 
SAVDFN= «•♦**♦ GX 
SAVE OOOOOORG 



$S$T1 = 000067 
.CLOSE= ****** 6 
.ERROR= ****** 6X 
.OPEN = ****** G 
.PUTSQ= ****** 6 



**** C 2 **** 



1 




***>• D 2 **** 



SCAN MACRO miOl U-DEC-77 10:<i5 PAGE 2 



1 



SCAN MACRO M1108 U-OEC-77 10:A5 PAGE 2 



.TITLE SCAN 
.IDENT /M05/ 



COPYRIGHT (C> 1976 

DIGITAL EQUIPMENT CORPORATION, MAVNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A 
SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE INCLU- 
SJON OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE. OR ANY 
OTHER COPIES THEREOF, MAY NOT BE PROVIDED OR OTHERWISE MADE 
AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH SYSTEM 
AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE TO AND 
OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC. 

THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPT'iENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS 
SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION M05 

RICHARD HULL" 1-N0V-71 



MODIFIED BY 


: 






R. 


MCLEAN 1-MAR-73 




E. 


R. 


GORDON 


1-OCT- 


73 


E. 


R. 


GORDON 


1-MAR- 


74 


D. 


N. 


CUTLER 


3-MAY- 


7A 


D. 


N. 


CUTLER 25-DEC 


-75 



016701 


OOOOOOG 


SCAN:: 


MOV 


016702 


OOOOOOG 




MOV 


004767 


000102 


11: 


CALL 


0*767 


000124 




CALL 


0405 






•R 


004767 


000102 




CALL 


122122 
000200 






CMPB 






PtS 


004767 


0000'j6 


21 1 


CALL 



TEXT STRING MATCHING ROUTINE 

ATTEMPT TO MATCH TWO CHARACTER STRINGS 
CALL SEQUENCE: 

JSR RO.SCAN ;SUBR. CALL 

ADDRESS OF STRING TO SEARCH FOR IN ARGI 

ADDRESS OF STRING WHERE SEARCH IS TO BE PERFORMED IN ARG2 

RETURN IF STRING NOT FOUND 

RETURN IF END OF STRING 1 FOUND 

RfTURN IF END OF STRING 2 FOUND 
ROUTINE USES REGISTERS R1 AND R2 (RO PERSERVED ON STACK) 



GET STRING POINTER 

TEST END OF STRING 1 FOUND 

lEST FOR "..." CONSTRUCTION 

"..."FOUND 

TEST END OF STRING FOUND 

TEST CHARACTER MATCH 

YES: CONT. TILL A STRING IS 

Exit SCAN - NO MATCH FOUND 

TEST END OF STRING 1 




•tt« ( 2 **** 



SCAn MACRO M1108 U-OEC-77 10:45 PAGE 2-1 



SCAN 



MACRO Ml 108 U 


- C-77 10:45 PAGE 2-1 






58 OOOOAO 


004767 


000064 




CALL 


20$ 


59 0000A4 


121122 






CMPB 


(R1).(R2)* 


60 0OO0A6 


001372 






BNE 


2$ 


61 000050 


010167 


OOOOOOG 




MOV 


R1,TEMP4 


62 00005A 


005201 






INC 


R1 


63 000056 


010267 


OOOOOOG 




MOV 


R2,TEMP3 


6A 000062 


004767 


000030 


3$: 


CALL 


10$ 


65 000066 


004767 


000052 




CALL 


30$ 


66 000072 


000760 






BR 


2$ 


67 00007A 


004767 


000030 




CALL 


20$ 


68 000100 


122122 






CMPB 


(R1)*.(R2)+ 


69 000102 


001767 






BEO 


3$ 


70 00010A 


016701 


OOOOOOG 




MOV 


TEMP4.R1 


71 000110 


016702 


OOOOOOG 




MOV 


TEMP3.R2 


72 0001 U 


000747 






BR 


2$ 


73 000116 


004767 


000106 


10$: 


CALL 


TST1 


74 000122 


001041 






BNE 


50$ 


75 0001 2A 


005720 




4S: 


TST 


(R0)t 


76 000126 


000404 






BR 


6$ 


77 000130 


004767 


000122 


20S: 


CALL 


TST2 


78 0001 34 


001034 






BNE 


50$ 


79 000136 


022020 




5S: 


CMP 


(RO)*,(RO)+ 


80 OOOUO 


005726 




6S: 


TST 


(SP)* 


81 000U2 


000200 






RTS 


RO 


82 000U4 


121127 


000056 


30$: 


CMPB 


(R1).*'. 


83 000150 


001024 






BNE 


7$ 


84 000152 


126127 


000001 000056 




CMPB 


1(R1),#'. 


85 000160 


001020 






BNE 


7$ 


86 000162 


126127 


000002 000056 




CMPB 


2(R1),*'. 


87 000170 


001014 






BNE 


7$ 


88 000172 


122127 


000056 


8S: 


CMPB 


(R1)*.#'. 


89 000176 


001775 






BEQ 


8$ 


90 000200 


005301 






DEC 


R1 


91 C00202 


004767 


000022 




CALL 


TST1 


92 000206 


001007 






BNE 


50$ 


93 000210 


004767 


000042 


40$: 


CALL 


TST2 


94 000214 


001743 






BEQ 


4$ 


95 000216 


005202 






INC 


R2 


96 000220 


000773 






BR 


40$ 


97 000222 


062716 


000002 


7i: 


ADD 


#2.(SP) 


98 000226 
99 
100 


000207 




50$: 


RETURN 








t 






101 






; TEST 


FOR END 


OF STRING 1 


102 












103 












104 000230 


105711 




TST1: 


TSTB 


(R1) 


105 000232 


001410 






BEQ 


'0$ 


106 000234 


122711 


000015 




CMPB 


/'15.(R1) 


107 000240 


001405 






BEQ 


i0$ 


108 000242 


122711 


0000 U 




CMPB 


#14, 'RD 


109 000246 


001402 






BEQ 


10$ 


110 000250 


126711 


OOOOOOG 




CMPB 


CATEN,(R1) 


in 000254 

1l! 

114 


000207 




10$: 


RETURN 








• 


FOR END 


OF STRING P 



TEST END OF STRING 2 
TEST CHARACTER MATCH 
NO: CONTINUE LOOKING 
SAVE STRING 1 POINTER 

SAVE STRING 2 POINTER 

TEST END OF STRING 1 

TEST FOR "..." CONSTRUCTION 

"..." FOUND 

7EST END OF STRING 2 

TEST FOR CHAR MATCH 

YES; tC.'EP LOOKING 

NO: RFSIORE R1 AND 2 

TRY AGAIN 

TEST FOR EVD OF STRING : 

IF NE NO MATCH 

BUMP EXIT 

MATCH ON STRING 1 

TEST FOR END OF STRING 2 

IF NE NO MATCH 

MATCH ON STRING 2 

CLEAN UP STACK 

RETURN TO CALLER 

TEST FOR "..." CONSTRUCTION 

NO 

MUST HAVE 3 IN A ROW 



;"..." CONSTRUCTION RECOGNIZED. 
.-BYPASS ALL PERIODS. 

TEST FOR NED OF STRING * 

IF NE MATCH 

TEST FOR END OF STRING 2 

IF EQ END OF STRING 

ADVANCE TO NEXT BYTE 

TRY AGAIN 

USE NO MATCH RETURN 



ZERO BYTE? 

IF EO YES 

CARRIAGE RETURN? 

F EQ rES 

fORM hEED' 

IF EQ YES 

CONCATENATION CHARACTER? 



I 



•••• f 2 



••*• 



SCAN MACRO M1108 14-0EC-77 10:45 PAGE 2-2 



SCAN MACRO Ml 108 U-DEC-77 10:45 PAGE 2-2 



117 000256 

118 000262 

119 00026A 

120 000270 



i 



122712 
00H02 
122712 
000207 



000001 



000015 
OOOOU 



TST2: 


CMPB 


#15. {R2) 


.•CARRIAGE RETURN? 




BEQ 


10$ 


;IF EQ YES 




CMPB 


iru, (R2) 


.•FORM FEED? 


10S: 


RETURN 







.END 



*••* 6 2 **** 



SCAN MACRCM110B U-DEC-77 10:45 PAGE 2-3 



SCAN MACRO Ml 108 H-DEC-77 10:A5 PAGE 2-3 
SfiBOL TABLE 

ARG1 = «*♦♦•• C.X CATEN = *♦*•♦♦ GX SCAN OOOOOORG TEMPA = *♦♦•♦♦ GX TST2 000256R 
ARG2 = ***♦•• C.X L»SIZE= 000206 TEMP3 = ****** GX TST1 000230R 

. ABS. 000000 000 
000272 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 224 WORDS ( 1 PAGES) 
DYNAMIC MEMORY: 1574A WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:05 

C37.20DSCAN.C37.30]SCAN/-SP=C37.10]EDPRE.SCAN 
Y 



*t** N 2 **** 



N 




•t«* 1 2 **** 



SRCC« MACRO mi08 U-DEC-77 10:45 

t ABi cm r nki t c ki t e 



SRCCM MACRO Ml 108 U-DEC-77 10:45 
TABLE OF CONTENTS 

3- 40 PAGE FIND. PAGE LOCATE. FIND. AND LOCATE COMMANDS 

4- 109 CHANGE. LC. AND PASTE COMMANDS 

5- 2A3 LINE CHANGE. PASTE. AND SEARCH COMMANDS 



tt** J 2 **** 



SRCCM MACRO M1108 U-DEC-77 10:45 PACE 2 



SRCCM MACRO M1108 U-OEC-77 10:A5 PAGE 2 



.TITLE SRCCH 
. I DENT /M06/ 



COPYRIGHT (C) 1976 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A 
SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE INCLU- 
SION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE, OR ANY 
OTHER COPIES THEREOF, MAY NOT BE PROVIDED OR OTHERWISE MADE 
AVAILABLE TO ANY OTHER PERSON EXCEPT FOR U:>E ON SUCH SYSTEM 
AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE TO AND 
OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC. 

THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 



DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF 
SOFTWARE ON EQUIPMENT WHICt: IS NOT SUPPLIED BY DEC. 

VERSION M06 

RICHARD HULLY 1-N0V-71 

MODIFIED BY: 

R. MCLEAN 1-MAR-73 

; E. \. GORDON l-OC :, 

i E. R. GORDON 1-MAA '• 

t D. N. CUTLER 21 -APR- , 

; D. N. CUTLER 25-DEC-75 

I D. N. CUTLER 5-JUN-76 

t D. N. CUTLER 19-JUL-76 

; SEARt-^ FUNCTIONS 



ITS 



*t«ft K 2 •*** 



SRCCM MACRO M1108 U-OEf-77 10:*5 PAGE 5 
DArj^ t ikK^ ttkcs inr*Tr t \Ntb AMD i nrATF roMMAND^ 



SRCCH IWCRO mi 08 U-DEC-77 10:45 PAGE 3 
PAGE FIND. PAGE LOCATE. FIND, AND LOCATE COHHANDS 



4S 

4A 

A5 000000 
46 OOOOOA 
A7 000010 

48 000012 

49 0C0016 

50 000022 

51 000026 

52 000030 
53 

54 
55 

56 000032 

57 000036 

58 000042 

59 000044 

60 000046 

61 000052 

62 000056 

63 000060 

64 000062 
65 



§ 



69 
70 
71 



000064 
000070 

72 000074 

73 000100 

74 000106 

75 000114 

76 000122 

77 000126 

78 000130 

79 000132 

80 000134 

81 000140 

82 000142 
" 000146 

000152 
000154 



000160 

91 000164 

92 000170 

93 000174 

94 000202 

95 000210 

96 000216 



.SBTTL PAGE FIND, PAGE LOCATE, FIND, AND LOCATE COMMANDS 



PAGE FIND COMMAND 



105267 
105767 
001025 
000167 
004067 
004067 
000415 
000415 



105267 
105767 
001046 
000762 
004067 
004067 
000401 
000437 
000207 



OOOOOOG 
OOOOOOG 

OOOOOOG 
OOOOOOG 
OOOOOOG 



OOOOOOG 
OOOOOOG 



OOOOOOG 
OOOOOOG 



PFIND:: 



PFIND3: 
PFIND1: 



.ENABL 

INCB 

TSTB 

BNE 

JMP 

JSR 

JSR 

BR 

BR 



LS6 

SSW1 

SBLKON 

FIND 

ILLCD 

RO. WRITES 

RO, READS 

10» 

FIND 



PAGE LOCATE COMMAND 



PLOCAT: 



PL0CA1 



10S: 



:INCB 
TSTB 
BNE 
BR 
JSR 
JSR 
BR 
BR 

RETURN 
.DSABL 



FIND COMMAND 



FIND:: 



004067 OOOOOOG 

000167 000040 

004067 OOOOOOG 

016767 OOOOOOG OOOOOOG 

016767 OOOOOOG OOOOOOG 

062767 000006 OOOOOOG 

004067 OOOOOOG 

000756 

000406 

000754 

105767 OOOOOOG U: 

001326 

000167 OOOOOOG FND6 

005367 OOOOOOG FND4 

003344 

000167 OOOOOOG 



JSR 
JMP 
JSR 
MOV 
MOV 
ADD 
JSR 

e 

TSTB 

BNE 

JMP 

DEC 

6GT 

JMP 



SSW1 
SBLKON 
LOCATE 
PFIND3 
RO, WRITES 
RO, READS 
10$ 
LOCATE 

LS6 



RO, INPUT 

IS 

RO, OUTPUT 

LAST,ARG2 

CWOS.ARGI 

«6,ARG2 

RO,SCAN 

FIND 

FND4 

FIND 

SSW1 

PFIND1 

EOF 

NUMBER 

FIND 

FND1 



004067 
000167 
004067 
016767 
016767 
062767 
004067 



OOOOOOG 
000040 
OOOOOOG 
OOOOOOG OOOOOOG 



LOCATE COMMAND 



LOCATE: 




:JSR 
JMP 
JSR 
MOV 

ADD 
JSR 



RO. INPUT 
4S 

RO. OUTPUT 

LAST,ARG2 

CWDS.ARG1 

#6.ARGr' 

RO.SCAN 



: INDICATE A PAGE FIND IS REQUESTED 

:MUST BE IN BLOCK MODE 

;0K 

.■ILLEGAL COMMAND MODE 

.'RENEW TO NEXT PAGE 

;EOF RETURN 

.LOOK ON THIS PAGE 



INDICATE A PAGE LOCATE 

MUST BE IN BLOCK MODE 

OK 

ILLEGAL COMMAND MODE 

RENEW TO NEXT PAGE 

EOF RETURN 

LOOK ON THIS PAGE 



IS REQUESTED 



;GET NEW LINE AND OUTPUT LAST 
;EOF RETURN 

; SETUP STRING POINTER 



.-NOT FOUND 

.END OF LINE FOR STRING 1 

.'LOOK AT NEXT LINE 

;WAS THIS A PAGE FIND REQUEST? 

.'YES: LOOK AT NEXT PAGE 

;FINISH IN COMMON rQDE 

; FOUND THE NTH OCCURRENCE OF THIS STRING? 

;N0: LOOK AGAIN 

;F1NISH IN COMMON CODE 



;GET NEW LINE AND OUTPUT LAST 
.'EOF RETURN 

.'SETUP STRING POINTER 
.'CALL STRING COMPARER 



**** L 2 **** 



SRCCM MACRO M1108 U-OfC-77 10:45 PAGE 3-1 
bkcs rtkin bkcs inrAtr riMb amd inrATF roMMANO^ 



SRCCH MACRO Mn08 U-DEC-77 10:45 PAGE 3-1 
PAGE FIND, PAGE LOCATE, FIND. AND LOCATE COMMANDS 



97 000222 

98 000224 

99 000226 
100 000230 

00023A 
000236 
103 0002A0 
10A 00024A 

105 0002 A6 

106 000252 

107 00025A 



101 
102 



000A06 

000410 

000754 

105767 0000006 

001742 

000703 

005267 OOOOOOG 

000764 

005367 OOOOOOG 

003372 

000167 OOOOOOG 





B 


2S 
3S 




BR 


LOCATE 


4li 


TSVB 


SSWI 




B^Q 


FND6 




BR 


PL0CA1 


21: 


INC 


ARG2 




BR 


1$ 


3t! 


DEC 


NUMBER 




BGT 


2% 




JMP 


FND1 



NOT FOUND THIS TRY 

FOUND 

NOT FOUND ANVWHERE IN THIS LINE 

WAS THIS A PAGE LOCATE REQUEST? 

NO 

LOOK AT NEXT PAGE 

START AT NEXT CHARACTER IN LINE 

FOUND THE NTH OCCURRENCE OF THIS STRING? 

NO: LOOK AGAIN 

YES: PRINT LINE IF IN VERIFY MODE 



•««• M 2 **** 



SRCCM MACRO M1108 U-DEC-77 10:45 PAGE 4 
CHANCi. LC. AND *^ASTF COMMANDS 



004067 OOOOOOG 

OOOOOOG 

0A2767 OOOOOOG 0000006 

000167 OOOOOOG 

105067 OOOOOOG CHANGE: 

016767 OOOOOOG OOOOOOG CHI : 

062767 000006 OOOOOOG 

016700 OOOOOOG CH2: 

105760 000004 

001002 

000167 000432 



005067 OOOOOOG 

016700 OOOOOOG 

111067 OOOOOOG 
105020 



SRCCM MACRO mi 08 U-DEC-77 10:45 
CHANGE. LC. AND ^ASTE COMMANDS 



109 
110 
111 
112 

113 0002oO 

114 300264 

115 000266 

116 000274 

117 000300 

118 000304 

119 000312 

120 000320 

121 000324 

122 000330 

123 000332 
124 

125 000336 
126 

127 000342 

128 000346 

129 000352 
130 

131 0CO354 

132 000360 

133 000364 

134 000366 

135 000372 

136 000374 

137 000400 

138 000402 

139 0004GiS 

140 000410 

141 000412 

142 000414 

143 0004K' 
U4 00042.. 

145 000426 

146 000430 

147 000434 

148 000436 

149 000442 

150 000444 
15^ 000450 

152 000452 

153 00045A 

154 000456 

155 000460 

156 000464 
157 

158 
159 

160 000472 

161 0004('6 
16? OOOSOO 
161 00050? 

000504 



PAGE 4 

.SeTTL CHANGE. LC. AND PASTE COMMANDS 
; REPLACE STRING 1 WITH STRING 2. 



CHO: 



201: 



010067 
121067 
001413 
121067 
001732 
121027 
002403 
121027 
003724 
005200 
000762 
105020 
0^0067 
121027 
003003 
121027 
002010 
121067 
001405 
121067 
001402 
105720 
000762 
105010 
166700 
01676/' 



OOOOOOG 
OOOOOOG 

OCOOOOG 

000013 

000015 



OOOOOOG 
000015 

00001 3 

OOOOOOG 

OOOOOOG 



24t: 



It! 

19t: 
4Si 

III 



OOOOOOG 
OOOOOOG OOOOOOG 



nt 



164 

165 000510 0007^0 



004067 OOOOOOG 

00040? 

000404 

COO'S 3? 

0ti1?67 OOOOOOG 



Sli 



Ml 



JSR 
MS6I 
BIC 
JMP 
:CLRB 
MOV 
ADD 
MOV 
TSTB 
BNE 
JMP 

CLR 

MOV 

MOVO 

CLRB 

MOV 

CMPB 

BEQ 

CMPB 

BEQ 

CMPB 

BLT 

CMPB 

BLE 

INC 

BR 

CLRB 

MOV 

CMPB 

BGT 

CMPB 

BGE 

CMPB 

BEQ 

CMPB 

BEQ 

TSTB 

BR 

CLRB 

SUB 

MOV 



RO. TYPED 

«MAC0P,SU2 

EDITS 

TEMP 

LAST.OARG 

«6.0AR6 

LAST.RO 

4(R0) 

20S 

CHI 7 

CDONE 

CWDS.RO 
(RO) .QUOTE 
(R0)» 

RO.ARGI 

(RO). QUOTE 

19ft 

(RO),CATEN 

CHO 

(R0).#13 

1« 

(R0).#15 

CHO 

RO 

24ft 

(R0)» 

RO, TEMPI 

(R0).#15 

?ft 

(R0),#13 

3ft 

(RO). QUOTE 

3ft 

(RO).CArEN 

3ft 

(R0)» 

4» 

<r.O) 

.EMP1.R0 

0ARG.ARG2 



RO.SCAN 



'i 



CHI 7 
ARG2 
91 



; ILLEGAL COMMAND CONSTRUCTION 

.■DISABLE MACRO PROCESSING 

.-INDICATE A CHANGE REQUEST WAS MADE 
.■BEGIN SEARCHING AT BEGINNING 
OF STRING. 
IF LINE ^ESN'T EXIST. DON'T ALLOW 
; A CHm /GE TO OCCUR. 

.•TELL USER THAT NO MATCH WAS MADE ?lNCE 
; THERE'S NO LINE IN THE FIRST PLACE. 
.-INDICATE NO CHANGES HAVE BEEN MADE 
; VET. 

.•GET CHAR STRING START ADDRESS 
.■FIRST CHAR IS THE QUOTE 
.•MARK THE SPOT WITH A NULL CHAR 
SO PASTE CAN USE IT AGAIN. 
.■START ADDRESS OF QUOTE STRING 
.•QUOTE AGAIN? 
;VES 

;C0NCATENATU1N CHARACTER? 
.•IF EQ rES 
.•VT. FF. AND CR ENDS R'^IUEST 

;C/R ENDS CHANGE REQUEST 



;KEEP LOOKING 

;PUT IN STOPPER OVERLAYING Ul, ■ " CHAm 
.•START ADDRESS OF REPLACEMEN, \UNG 
.•DELETE QUOTE, ff . OR C/R AT END OF 
; STRING. (ALSO VT'S) 



;C0NCATENA1I0N CHARACTER? 
;IF EO YES 

.CONTINUE SE/RCH 

.•END OF STRING STOPPER 

;NBR. Of CHARS IN REPLACEMENT STRING 

.•SETUP SCAN POINTER. BEGIN flTHER 
AT BEGINNING OF LINE IF "CHANGF" 
OR AT END OF i.AST REPLACEMENT 

; IF 'IC" OR •■. ASTE". 

.•CALL STRING COMPARER 

.•'K)T FOUND THIS TRY 

;r'OUND 

.NOT FOUND ANYWHERE IN THIS LINE 

;">'*RT AT N|X» CHAR IN NEW LINE 



•••• M 2 •••• 



SRCCH MACRO Mil 08 U-OEC-77 10: A5 PAGE 4-1 
CHANCE, LC. AND PASTE COMMANDS 



166 0OOS12 

167 000516 

168 000520 

169 00052A 
170 

171 000526 

172 000550 

173 000532 
17A 00053A 

175 0005*0 

176 000544 

177 0005A6 

178 000550 

179 000552 

180 000554 
181 

182 000560 

183 000562 

184 000564 
i8S 000566 

186 000572 

187 000574 

188 000602 
18? 000604 

170 000606 

191 000612 

192 000616 

193 000620 

194 000624 

195 000630 

196 000632 

197 000634 

198 000636 

199 000642 

200 000644 

201 000646 

202 000650 
201 000652 

204 000654 

205 000660 

207 0006% 

i72 

m 




166702 OOOOOOG 7$: 

001003 

105767 OOOOOOG 

001255 

010001 2SS: 

160200 

002032 

016702 OOOOOOG 

016703 OOOOOOG 

105713 9$: 

001402 

112322 

000774 

010267 OOOOOOG 8S: 

005400 

060200 

112012 10S: 

122227 000014 

003374 

1^6227 \77777 000012 

Uu^770 

010204 

166704 OOOOOOG 

162704 000006 

000453 

016703 OOOOOOG 111: 

122723 000015 12$: 

00:375 

005303 

010302 

166702 OOOOOOG 

010304 



122323 

060300 

166704 OOOOOOG 

162704 000006 

027704 OvaIOOG 
103010 

»7 00000 G 




^763 
)167 
114340 

mm 

016702 OOOOOOG 
0167QS OOOOOOG 

fe'' 



OOOOOOG 



op^^i 



010267 OOOOOOG 



131: 



t4»i 



251: 



SUB 
BNE 
TSTB 
BNE 

MOV 

SUB 

BGE 

MOV 

MOV 

TSTB 

BEQ 

MOVB 

Bft 

MOV 

NEr. 

ADD 

MOVB 

CMPB 

BGT 

CMPB 

BLT 

MOV 

SUB 

SUB 

BR 

MOV 

CMPB 

BNE 

DEC 

MOV 

SUB 

MOV 

ADD 

CMPB 

CMPB 

ADD 

SUB 

SUB 

CMP 

BNIS 

JSR 

MSC8 

BIC 

JMP 

MOVB 

DEC 

BGT 

MOV 

MOV 

CMPB 

TSTB 

BEO 

MOVB 

8R 

MOV 



ARG2,R2 
23S 

TEMP 
CHO 

R0.R1 
R2.R0 

in 

ARG2.R2 

TEMPI. R3 

(R3) 

8S 

(R3)*,(R2)* 

9» 

R2,0ARG 

RO 

R2.R0 
(R0)«,(R2) 
(R2)».#14 

lot 

-1(R2).*12 

lot 

R2.R4 

LAST.R4 

»6,R4 

CHI 5 

AftG2.R3 

#15. (R3)* 

12t 

R3 

R3.R2 

ARG2.R2 

R3.R4 

R0.R4 

(R3)*.(R3)» 

(R2>«,(R2)« 

R3.R0 

LAST,R4 

»6.R4 

iLAST.R4 

I5t 

RO. TYPED 

*MAC0P.SW2 

fND2 

-(RS).-(RO) 

% 

ARG2.R2 
TEMPI .R3 
(R4)«,(R4)» 
(R3) 

(R3)*.(R?)t 

14t 

R2.0ARG 



.•CALCULATE LENGTH OF MATCHING STRING 

;IF NE MATCHING STRING HAS NONZERO LENGTH 

;IF PASTE OR LC WAS ACTIVE. WE BETTER 

FORGET IT OR WE'LL END UP IN 

AN INFINITE LOOP. 
'SAVE TEMP. 
; COMPUTE DIFFERENCE IN STRING SIZES 

.■REPLACEMENT STRING IS SMALLER THAN 

ORIG. STRING. THEREFORE THE MAIN 
STRING MUST BE SHORTENED. THE 
REPLACEMENT TEXT IS SUBSTITUTED 
FIRST. 

.-REMEMBER WHERE REPLACEMFNT 

TEX'" LEFT OFF. 
;NOW CONTRACT MAIN STRING 



.-END OF STRING? 

.END OF STRING? 
;N0: CONTINUE 



.•REPLACEMENT STRING IS LARGER THAN ORIG 

;ENO OF LINE? 

;IF NE NO 

;BACK UP TO CARRIAGE RETURN 

;COPV ENDI.'IG ADDRESS 

;CALCULATE ; ENGTH OF STRING 

.'MAKE SURE T,« NEW STRING HAS ENOUGH 

ROOM. 
;POINT PAST LINE FEED 
.-ADJUST COUNT TO INCLUDE CR/IF 
: CALCULATE NEW END OF LINE ADDRESS 
; CALCULATE NEW LENGTH OF LINE 

;LINE BUFFFR BIG ENOUGH? 

;ir HIS VfS 

;T00 MANY CHARS IN LINE 

.DISABLE MACRO MODE 

.-EXPAND STRING NOW 
;ALL DONE? 
;N0: CONTINUE 
.-INSERT REPLACEMENT TEXT 

.-ADJUST LINE SIZE TO ACOUNT FOR CR/LF 



.-REMEMBER WHERE REPLACEMENT TEXT 



•••• if 



•••• 



K>rrM MAr>ft min^ iA.Mf-» \r\n Ptf.r i-3 



SRCCM MACRO Ml 108 U-OEC-77 10:45 
CHANGE. LC, AND PASTE COMMANDS 



225 

224 000746 

225 000752 

226 000756 

227 000762 

228 000766 

229 000770 

230 000774 

231 001000 

232 001002 

233 001006 

234 001010 

235 001014 

236 001016 

237 001024 

238 001026 

239 001032 

240 001034 

241 001040 



016700 

005267 

010460 

105767 

001076 

016700 

105767 

001036 

005767 

001007 

004067 

OOOOOOG 

042767 

000207 

005367 

003402 

000167 

00016/ 



OOOOOOG 
OOOOOOG 
000004 
OOOOOOG 

OOOOOOG 
OOOOOOG 



PAGE 4-2 



CHI 5: 



CH17: 



OOOOOOG 
OOOOOOG 

OOOOOOG OOOOOOG 
OOOOOOG 2SS: 



177240 
OOOOOOG 



CH18: 



MOV 

INC 

MOV 

TSTB 

BNE 

MOV 

TSTB 

BNE 

TST 

BNE 

JSR 

.WORD 

BIC 

RETURN 

DEC 

BLE 

JMP 

JMP 



LAST.RO 

CDONE 

R4.4(R0) 

TEMP 

PASTE3 

LAST.RO 

TEMP 

PASTE1 

CDONE 

25$ 

RO, TYPED 

ILLSTR 

«MAC0P.SW2 

NUMBER 
CH18 
CHANGE 
FND1 



LEFT OFF. 
.•COMPUTE NEW HEADER WORD COUNT 
; INDICATE A CHANGE WAS MADE TO THIS LINE 

;IF PASTE IS ACTIVE. DO THE CHANGE AGAIN 



PASTE ACTIVE? 

YES 

ANY CHANGES MADE SO FAR? 

YES 

ILLEGAL STUNG 

CLEAR MACRO IN PROGRESS 

NTH CHANGE MADE YET? 

YES 

NO: DO NEXT THEN 

PRINTOUT NEW LINE 



•••• c 3 *•*• 



tmrnt MArhi-> MtlfV* tl-flSr-T* in.i.t BAftC t 



SRCCM MACRO Ml 108 U-DEC-77 10:A5 PAGE 5 
LINE CHANGE. PASTE. AND 3EARCH COMMANDS 



2A3 

2<.A 

2A5 

2A6 

2A7 

2A8 

2A9 001044 

250 

251 

252 

253 

254 

255 001050 

256 

257 

258 

259 

260 

261 001054 

262 001060 

263 001064 

264 001072 

265 001076 

266 001102 

267 001104 

268 001110 

269 001112 

270 001116 

271 001120 

272 001124 

273 001126 

274 001132 

275 001136 

276 001142 

277 001144 

278 001146 

279 001152 

280 001156 

281 001162 

282 001164 

283 001172 
^84 001176 

285 001200 

286 001206 

287 001210 

288 001216 

289 001220 
290 



.SBTTL LINE CHANGE, PASTE, AND SEARCH COMMANDS 



105267 OOOOOOG 



052715 OOOOOOG 



; SEARCH CHANGE COMMAND 

; 

.ENABL LSB 

SC:: INCB ISWl 



PASTE COMMAND 



PASTE:: BIS 



#LC0P,(R5) 



105267 
005067 
052767 
000167 
032715 
001003 
005367 
003753 
005767 
001413 
105767 
001404 
016700 
004067 
105767 
001401 
000207 
004067 
000167 
004067 
000736 
066767 
105767 
001345 
)227?? 
001733 
) 22777 
001727 
000167 



000001 



LINE CHANGE COMMAND 



OOOOOOG LC:: 
OOOOOOG PASTEO: 
OOOOOOG OOOOOOG 
177206 



OOOOCOG 

OOOOOOG 

OOOOOOG 

OOOOOOG 

OOOOOOG 
OOOOOOG 
OOOOOOG 



OOOOOOG 
OOOOOOG 
OOOOOOG 



PASTE1 I 



10S: 



20$: 



30t: 



OOOOOOG OOOOOOG PASTES: 
OOOOOOG 

000015 OOOOOOG 

000014 OOOOOOG 

177074 



INCB 

CLR 

BIS 

JMP 

BIT 

BNE 

DEC 

BLE 

TST 

BEQ 

TSTB 

BEQ 

MOV 

JSR 

TSTB 

BEQ 

RETURN 

JSR 

JMP 

JSR 

BR 

ADD 

TSTB 

BNE 

CMPB 

BEQ 

CMPB 

BEQ 

JMP 

.DSABL 

.END 



TEMP 

PDONE 

#LCPAS,SW2 

CHI 

#LC0P,(R5) 

10S 

NUMBER 

CHI 8 

PDONE 

30t 

tVON 

20$ 

LAST.RO 

RO.TYPLN 

$$W1 

30$ 

RO. INPUT 

EOF 

90, OUTPUT 

PASTEO 

CDONE, PDONE 

$SW1 

10$ 

iri5,80ARG 

PASTE 1 

«U,80ARG 

PASTE1 

CH2 

LSB 



;SET SEARCH CHANGE COMMAND ACTIVE 



.•INDICATE A PASTE IS REQUESTED 



CLEAR COUNTEK FOR CHANGES MADE 

INDICATE A PASTE OR LC IS ACTIVE 

PROCESS PASTE REQUEST FOR CURhENT LINE 

LINE CHANGE RATHER THAN PASTE? 

iF NE NO 

ALL CHANGES MADE? 

IF LE YES 

WAS A CHANGE MADE? 

NO: LOOK AT NEXT LINE 

PRINT LINE (VERIFY)? 

NO 

YES: TYPE IT OUT 

SEARCH OPERATION 
IF EQ NO 

GET A NEW LINE 
END OF FILE RETURN 



REMEMBER A CHANGE WAS MADE 

SEARCH CHANGE COMMAND? 

IF NE YES 

AT END OF LINE? 

IF EQ YES 

AT END OF LINE? 

I' EQ YES 

DO LINE AGAIN IN CASE THERE'S MORE 



•••• D 3 ***• 



4lRrrM MArnOMIIOR U-DIC-77 10:4* PAGF 5-1 



SRCCM MACRO Ml 108 
SYMBOL TABLE 



U-DEC-77 10:A5 PAGE 5-1 



ARG1 ' 
ARG2 s 
CATEN = 
CDONE = 
CHANGE 
CHO 
CHI 
CHI 5 
CHI 7 
CHI 8 
CH2 
CWDS = 

. ABS. 



*••*•• GX 
•***•* GX 
*•***• GX 

***••* GX 

000300RG 

000260R 

00030AR 

0007A6R 

000770R 

0010A0R 

000320R 

**«*•• GX 



EDITS = 
EOF = 
FIND 
FND1 = 
FN02 = 
FNDA 
FND6 
ILLCD = 
ILLSTRr 
INF>UT « 
LAST = 
LC 



****** GX 
****** GX 

00006ARG 
****** GX 
****** GX 

000U6R 
000U2R 
****** GX 

****** GX 
****** GX 
****** GX 
001054RG 



LCOP = 
LCPAS « 
LOCATE 
LSSIZE= 
MACOP s 
MSG1 = 
nSG8 = 
NUMBER: 
OARG = 
OUTPUTS 
PASTE 



****** GX 
****** GX 
0001 60RG 
000206 



GX 
GX 
GX 
GX 
GX 
GX 
001050RG 



f!***** 
****** 
****** 

****** 
****** 
****** 



000000 
001 22A 
ERRORS DETECTED: 



000 
001 



VIRTUAL MEMORY USED: 537 WORDS ( 3 PAGES) 
DYNAMIC MEMORY: 1574A WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:11 
C37.2G3SRCCM.C37,30]SRCCM/-SP«C37.103EDPRE, SRCCM 



PASTEO 
PASTE 1 
PASTE 3 
PDONE = 
PFIND 
PFIND1 
PFIND3 
PLOCAT 
PL0CA1 
QUOTE = 
READS = 



001060R 
001076R 
001164R 
****** GX 
OOOOOORG 
00001 6R 
00001 2R 
000032RG 
000046R 
****** GX 
****** GX 



SC 0010URG 


SCAN = - 


****** GX 


SW2 = < 


>***** GX 


TEMP = < 


►*♦**• GX 


TEMPI = - 


****** 6X 


TYPED = - 


1***** GX 


TYPLN = < 


****** GX 


WRITES= < 


>***** GX 


SBLKON- ' 


****** GX 


SSWI s < 


****** GX 


$VON = * 


****** GX 



•••t I s ••«« 



N \ 




•••• f 3 •••* 



STW! MACRO MIIOB U-OEC-77 10:*5 



START MACRO M1108 U-DEC-77 10:A5 
TABLE OF CONTENTS 

3- 58 BEGINNING OF EDITOR 
A- 97 EDITOR RESTART 



tttt 6 S **** 



START MACRO M1108 U-DtC-77 10:«5 PAGE 2 



START MACRO MIIOB U-DEC-77 10:A5 PAGE 2 



1 

! 



49 000000 
000003 111 
000006 000 

$0 000007 

000012 ni 

15 055 

116 

r 

10 




015 


105 


076 


013 


015 


105 


040 


055 


10« 


11 


!?i 



1 1 



105 



.TITLE START 
.IDENT /M09/ 



COPYRIGHT (C) 1976 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A 
SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE INCLU- 
SION OF THE ABOVE COPYRIGHT NOTICE. HIS SOFTWARE, OR ANY 
OTHER COPIES THEREOF, MAY NOT BE PROVIDED OR OTHERWISE MADE 
AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH SYSTEM 
AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE TO AND 
OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC. 

THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILIIY OF ITS 
SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION M09 

RICHARD HULLY 1-N0V-71 

MODIFIED BY: 

R. MCLEAN 1-MAR-73 

E. R. GORDON 1-OCT-73 

E. R. GORDON 1-MAR-7A 

D. N. CUTLER 21-APR-74 

D. N. CUTLER 23-JAN-75 

D. N. CUTLER 22-DEC-75 

D. N. CUTLER 5-JUN-76 

D. N. CUTLER 25-JUL-76 

D. N. CUTLER 9-JUN-77 



MACRO LIBRARY CALLS 

.MCALL DIRS,FX]T»S,FINlTt,GPRTSS,OPENSR,OPENSW 

LOCAL DATA 
104 MSGOs .ASCI? <15>/EDI>/<13> 
104 MS61: .ASCII <15>/EDI — INSUFFICIENT BUFFER SPACE/<r"»<12> i 



•••• 



TT 



*••• 



START MACRO M1108 U-OEC-77 10:45 PAGE 2-1 



START MACRO Ml 108 U-OEC-77 10: A5 PAGE 2-1 



000031 


116 


124 


00003A 


102 


125 


000057 


106 


105 


0O0OA2 


040 


123 


0O0OA5 


101 


103 


000050 


015 


012 


51 


000052 


133 


000055 


111 


124 


000060 


015 


012 


52 000063 


133 


000066 


105 


101 


000071 


111 


116 


00007A 


040 


116 


000077 


127 


040 


000102 


111 


114 


000105 


135 


015 


000110 


111 


116 


000113 


125 


124 


53 000116 


133 


000121 


116 


124 


0001 2A 


130 


040 


000127 


122 


12? 


000132 


122 


13 > 


5A 000135 


r3 


OOOUO 


103 


117 


000U3 


104 


101 


000U6 


131 


040 


000151 


ri 


114 


000154 


040 


103 


000157 


122 


122 


000162 


116 


124 


000165 


131 


040 


000170 


105 


114 


000173 


103 


124 


000176 


104 


040 


000201 


117 


122 


000204 


111 


116 


000207 


125 


124 


000212 


000 




55 000213 


133 


000216 


103 


117 


000221 


104 


101 


000224 


131 


040 


000227 


111 


114 


000232 


040 


101 


000235 


122 


105 


000240 


104 


131 


000243 


117 


120 


'««"% 


116 


135 



040 
106 
122 
120 
105 

105 
135 
000 
103 
124 
107 
105 
106 
105 
012 
120 
000 
123 
101 
105 
117 
000 
123 
116 
122 
106 
105 
125 
105 
114 
123 
105 
105 

?i 

135 

123 
116 
122 

;st 

114 
101 
040 
105 
000 



130 .ASCIZ /CEXIT]/<15><12> ; 

122 MSG18: .ASCIZ /CCRw=ATlN6 NEW nLE]/<15><12>/INPUT/ 



131 SYNTAX: .ASCI/ /CSYNTAX ERROR]/ 



105 SECNOT: .ASCIZ /[SECONDARY FILE CURRENTLY SELECTtO FOR INPUT]/ 



105 SECOND: .ASCIZ /[SECONDARY FILE ALREADY OPEN]/ ; 



.EVEN 



••t* I S *•** 



STAR1 MACRO M1108 14-0IC-77 10:45 PAGI S 



START MACRO HI 108 
BEGINNING OF EDITOR 



U-DEC-77 10:A5 PAGE 3 



60 0002*52 

61 000256 

62 000262 

63 000266 

64 000272 

65 00027A 

66 000310 
67 

68 
69 

70 000330 

71 00033* 

72 000336 

73 000342 

74 000350 

75 000354 

76 000360 

77 000364 

78 000370 

79 000372 

80 00C376 

81 000400 

82 000406 

83 000412 

84 000420 

85 000426 

86 000430 

87 000436 

88 000444 

89 000446 

90 000452 

91 000454 

92 000460 

93 000464 

94 000466 

95 000470 



010667 OOOOOOG BEGIN: 

012705 OOOOOOG 

162706 000006 
010600 

016600 000002 
000006 



066700 OOOOOOG 

005740 

010067 OOOOOOG 

016767 000002G OOOOOOG 

166700 OOOOOOG 

012701 000206 

020027 000003 

101006 

004067 OOOOOOG 

000007' 

010067 OOOOOOG 5t: 

112767 000001 OOOOOOG 



10340? 



105412 

016702 OOOOOOG 

010746 

012701 00001 OG 

122127 000040 

001406 

005302 

003373 



10$: 



IS: 



.SBTTL BEGINNING OF EDITOR 



MOV 


SP.SSPSAV 


MOV 


#SWITCH,R5 


FINITS 




SUB 


#3*2.SP 
SP.RO 

.r6 

2(SP),R0 


MOV 


GPRTSS 


MOV 


• REPT 


6 


ASL 


RO 


.ENDR 




ADD 


SDSW.RO 


TST 


-(RO) 


MOV 


RO.ENDM 


MOV 


SLIMITt2..BEG 


SUB 


.BEG.RO 


MOV 


«LSSI2E.R1 


CALL 


SDIV 


CMP 


R0,*3 


BHI 


5S 


JSR 


RO. TYPED 


.WORD 


MSG1 


EXITSS 




MOV 


RO.SIZEBF 


MOVB 


«1,SBLK0N 


DIRS 


#ATT 


BCS 


10$ 


DIRS 


#WT 


DIRS 


«.GETLN 


BCS 


STRTS 


MOV 


SDSW.R2 


MOV 


PC,-(SP) 


MOV 


#CMD»8.,n 


CMPB 


(R1)»,#40 


BEQ 


NOPRMV 


DEC 


R2 


BGT 


1$ 



SAVE INITIAL STACK POINTER 

SET ADDRESS OF FIRST SWITCH WORD 

INITALIZE THE FILE SVSTEM 

MAKE ROOM FOR PARTITION PARAMETERS 

POINT TO BUFFER AREA 

GET PARTITION PARAMETERS 

GET SIZE OF PARTITION IN 32W BLOCKS 

CONVERT TO SIZE IN BYTES 

CALCULATE ENDING ADDRESS 

SET ENDING ADDRESS 

SET STARTING ADDRESS 

CALCULATE SIZE OF BUFFER 

SET DIVISOR 

CALCULATE DEFAULT BUFFER SIZE 

ROOM FOR AT LEAST THREE LINES? 

IF HI YES 

OUTPUT ERROR MESSAGE 

EXIT 

SET SIZE OF READ BUFFER 

TURN BLOCK MODE ON 

ATTACH TO INPUT TERMINAL 

IGNOR UNSUCCESSFUL ATTACH 

WAIT FOR ATTACH TO COMPLETE 

READ MCR COMMAND LINE 

IF NO LINE RECEIVED . PROMPT FOR FILE NAME 

GET BYTE COUNT OF RETURNED LINE 

SET MCR COMMAND LINE FLAG 

BEGININu OF BUFFER TO R1 

FOUND SPACE? 

YES HAVE FILE NAME 

ANY MOF;: CHARACTERS TO SCAN? 

IF GT YES 



••*• J s •••• 



START MACRO M1108 U-DEC-77 10:45 PAGE 4 



START MACRO Ml 108 
EDITOR RESTART 



97 

98 

99 

100 

101 000A72 

102 000476 

103 000500 

104 000502 

105 000506 

106 000512 
10? 000516 

108 000522 

109 000526 

110 00053A 

111 0005A2 

112 0005A6 

113 000552 
1U 000556 

115 000562 

116 000566 

117 000572 

118 000576 

119 000602 

120 000604 

121 000606 

122 000612 

123 000616 

124 000622 

125 000626 

126 000630 

127 000634 

128 000640 

129 000644 

130 000650 

131 000652 
13i. 000656 

133 000660 

134 000662 

135 000670 

136 000674 

137 000700 

138 000702 

139 000706 

140 000710 

141 000716 

142 000722 

145 ''00734 

146 000734 

147 000740 

148 000742 

149 000746 

150 000754 

151 000760 



14-0EC-77 10:45 PAGE 4 



.SBTTL EDITOR RESTART 



004067 OOOOOOC 

000000' 

005046 

005067 000004G 

005067 000004G 

005067 000004G 

005067 OOOOOOG 

012767 OOOOOOG OOOOOOG 

012767 OOOOOOG OOOOOOG 



START/RESTART EDITOR 



STRTS: 



NOPRMT 



112700 
105067 
105067 
110067 
110067 
042715 
005067 
005716 
001015 
012700 
004067 
012701 
122711 
001002 
000167 
012704 
012703 

103004 

004067 

000116' 

000704 

016767 

012700 

012701 

012021 

020027 

101774 

112767 

005767 

001407 

m; 

052715 
000427 
042715 
012767 
005067 
152767 



000001 

OOOOOOC 

OOOOOOG 

OOOOOOG 

OOOOOOG 

047575 

OOOOOOG 



OOOOOOG 
OOOOOOG 
000006G 
000015 

OOOOOOG 

OOOOOOG 21: 

OOOOOOG 



OOOOOOG 



OOOOOOG OOOOOOG 3$: 
OOOOOOC ONED: 
OOOOOOG 

10S: 
00001 2G 

OOOOOOG OOOOOOC 
OOOOOOG 

OOOOOOG 0000 10G 



OOOOOOG 

OOOOOOG 

054523 OOOOOOC 
OOOOOOC 
OOOOOOG OOOOOOG 



.NSF: 
OKNSF 



116067 OOOOOOG OOOOOOC 



JSR 

MSGO 

CLR 

CALL 

CLR 

CLR 

CLR 

CLR 

MOV 

MOV 

CALL 

MOVB 

CLRB 

CLRB 

MOVB 

MOVB 

BIC 

CLR 

TST 

BNE 

MOV 

JSR 

MOV 

CMPB 

BNE 

JMP 

MOV 

MOV 

CALL 

BCC 

JSR 

BR 

MOV 

MOV 

MOV 

MOV 

CMP 

BLOS 

MOVB 

TST 

BEQ 

MOV 

BR 

BIS 
BR 

BIC 

MOV 

CLR 

B1S8 

OPEKitR 

MOVB 



RO.TrPED 

-(SP) 

•TIDVI 

CMD^4 

.LAST*4 

.THIS+4 

.PREV 

#. LAST. LAST 

#. THIS, THIS 

tSETBF 

iri.RO 

SOUTON 

STABON 

RO. SUPPER 

RO.SVON 

#47575. (R5) 

SU2 

(SP) 

2% 

tVCMD.RO 

RO, TYPE IN 

«CMD«6.R1 

#15. (R1) 

2$ 

B0TT13 

#INFiL.R4 

#lNfILN.R3 

GETNM 

3« 

frO.TyPEO 

SVNTAX 

STRTS 

VERFLG.INPVER 

#1NFILN.R0 

#0UTFIL.R1 

(R0)».(R1)» 

R0.#1NFILN»12 

loi 

#FD.CR.OUTBLK» 

VERFLG 

OKNSF 

VERFLG. OUTFIL* 

OKNSF 



.•ANNOUNCE PRESENCE ON RESTARTS 



: CLOSE OUT ANY FILES FROM PREVIOUS EDIT 
.-EMPTY ALL BUFFERS 



.'INITIALIZE WORK BUFFERS 

.-SETUP BUFFER AREA 

.-GET ON SWITCH 

; CLEAR OUTPUT ON 

.'CLEAR TAB ON 

.'SET UPPER CASE ON 

;SET VERIFY ON 

[■INITIALIZE SWITCH SETTINGS 

.'CLEAR ALL OPTION SWITCHES 

.'ALREADY HAVE FILE NAME 

.'IF NE YES 

.'GET NAME OF FILE 

;GET ADDRESS OF COMMAND LINE 

; FIRST CHARACTER CARRIAGE RETURN? 

.'IF NE NO 

;E)(1T EDITOR 

;GET FILE NAME AND PUT IT HERE (INFIL) 

.•SET UP POINTER TO FILE NAME BLOCK 

.'YES GO TO PARSE 

; SYNTAX ERROR ON FILENAME 

.'RESTART EDITOR 

.'SAVE INPUT FILE VERSION NUMBER FLAG 

.GET ADDRESS OF INPUT FILE NAME 

.'GET ADDRESS OF OUTPUT FILE NAME 

.'MOVE INPUT FHF name to output FILE NAME 

.'DONE WITH MOVE? 

:IF LOS NO 

F.RATT .'DEFAULT RECORD ATTRIBUTES 
.VERSION SET? 
;IF EQ NO 

10 ;DON'T OPEN OUTPUT FILE WITH VERSION 



.REMEMBER THAI THERE IS NO INPUT FILI 



#N0INFL.(R5) 
NOINP 

#N0INFL.{R5) ;CLEAR INPUT FILE NOT PRESENT SWITCH 

#1Y,1NPDFN*N.DVNM .RESET OEFAUIT INPUT DFVICE NAME 
INPDFN»N.UNIT .-RESET DEFAULT INPUT DEVICE UNIT 
#NSF.ER.FLG ;S£T NO SJCH FILE LEGAL 

#INP6LK..,,...ERft0R :0PEN INPUT FILE 
F.RATT(RO).OOTBlK^r.RATT jPRfSERVE RECORD ATTRIBUTES 



•••• K 3 •••« 



~1 



START MACRO Ml 108 



14-0tC-77 10:45 PACE 4-1 



START MACRO M1108 
EDITOR RESTART 



U-OEC-77 10:«5 PAGE 4-1 



154 001020 

155 00102A 

156 001050 

157 001056 

158 001064 

159 001072 

160 001100 

161 001104 

162 001110 

163 001114 

164 001120 

165 001124 

166 001130 

167 001134 

168 001140 

169 001142 

170 001146 

171 001150 

172 001154 

173 001156 

174 001162 

175 001164 

176 001170 
177 

178 001172 

179 001176 

180 001200 

181 001204 

182 001210 

183 001214 

184 001220 

185 001222 

186 001226 
187 

188 
189 
190 
191 

192 001232 

193 001236 

194 001242 

195 001244 

196 001250 

197 001254 

198 001256 

199 001260 
iSP (^1^62 

201 001266 

202 001272 

203 001274 

204 001300 

205 001302 

206 001504 



% 



105067 OOOOOOG 



NOINP: 



016067 
016067 
016067 
016067 
105067 
105067 
005067 
005067 

005067 

105267 

032715 

001411 

004067 

000213' 

032715 

001403 

004067 

000135' 

032715 

001011 

105767 

001413 

012701 

012746 

000177 

004067 

000063' 

000177 

000167 



OOOOOOG OOOOOOC 
OOOOOOG OOOOOOC 
OOOOOOG OOOOOOC 
OOOOOOG OOOOOOC 
OOOOOOG 
OOOOOOG 
000004G 
000004G 

OOOOOOG 
OOOOOOG 
OOOOOOG 

OOOOOOG 

OOOOOCG 

OOOOOOG 

OOOOOOG 



OOOOOOG 

000001 
OOOOOOG 
OOOOOOG 
OOOOOOG 

OOOOOOG 
OOOOOOG 



016701 OOOOOOG 

012703 0000006 
005013 

005067 000004G 
005067 0000 10G 
105711 
000261 
00U11 

012704 OOOOOOG 

105004 

004067 OOOOOOG 

OOOOOOG 

005726 

000207 

000001 



2t: 



8S: 

10S: 



CLRB 
OPENSW 

nov 

NOV 

MOV 

MOV 

CLRB 

CLRB 

CLR 

CLR 

CALL 

CLR 

INCB 

BIT 

BEQ 

JSR 

SECOND 

BIT 

BEQ 

JSR 

SECNOT 

BIT 

BNE 

TSTB 

BEQ 

MOV 

MOV 

JMP 

JSR 

MSG18 

JMP 

JMP 



ER.FLG 

WUTBLK..,. 

F.DVNM(RO), 

F.UNIT(RO). 

F.DVNM(RO), 

F.UNIT(RO), 

$SW1 

SSW2 

.THIS*4 

.LAST*4 

ERASES 

PAGE 

tOUTON 

#SEC0PN,<R5 

2$ 

RO. TYPED 

«SS0N.(R5) 
2S 

RO. TYPED 



fN0INFL.(R5) 
8S 

SBLKON 

lot 

#1,R1 

#ED1TS.-(SP) 
aRNEUl 
RO, TYPED 

8INPTS 
EDITS 



.■CLEAR FLAG 
...ERROR .-OPEN OUTPUT FILE 

INPOFN»N.DVNM ;SET INPUT FILE DEFAULT DEVICE NAME 
IKPOFN*N.UNIT ;SET INPUT FILE DEFAULT DEVICE UNIT 
SAVOFN»N.DVNM .-SET SAVE FILE DEFAULT DEVICE NAME 
SAVOFNtN.UNIT ;SET SAVE FILE DEFAULT DEVICE UNIT 

.■CLEAR SWITCH CONTROL FLAGS 

;EMPTY ALL LINE BUFFERS FROM 

ANY PREVIOUS EDITS. 
.■ALSO THE BLOCK BUFFER 
; BEGIN ON PAGE 7ER0 
;MAICE SURE OUTPUT SWITCH IS ON 
;IS SECONDARY FILE STILL OPEN (FROM 

PREVIOUS EDITS)? 
;YES: TELL USER 



;IS IT ALSO CURRENTLY SELECTED FOR 

INPUT? 
;YES: TELL USER THIS ALSO 

;IF THERE WAS NO INPUT FILE OPEN. GO 
IMMEDIATELY TO INPUT MODE UNLESS 
BLOCK MODE IS DEFINED. 

;D0 AN AUTOMATIC 'IJENEW 1" COMMAND IF 
USER IS IN BLOCK MODE. 

.SET RETURN ADDRESS FOR RENEW 

.-USE "CREATE" MESSAGE TO SIGNAL USER 

THAT HE'S IN INPUT MODE NOW. 
;ENTfR INPUT MODE 
.■ENTER EDIT MODE 



SUBROUTINE TO PARSE SAVE FILE SPECIFIER 



PSAVF ; 



lOtt 



MOV 

MOV 

CLR 

CLR 

CLR 

TSTB 

SEC 

BEO 

MOV 

CALL 

BCC 

JSR 

.WORD 

rsT 

RETURN 
.END 



CWDS.R1 ;GET ADDRESS OF COMMAND LINE HEADER 

#SAVFI.R3 ;POINT TO DATA SET DESCRIPTOR 

(R3) .-CLEAR DEVICE STRING LENGTH 

SAVF1»4 ;CIEAR DIRECTORY STRING LENGTH 

SAVFIOO ;CLEAR FILENAME STRING LENGTH 

(R1) ;ANY INPUT SPECIFIED? 

.■ASSUME NO INPUT 

lOf .-IF EQ NO INPUT 

#SAVFIL.R4 .POINT TO FILENAME BUFFER 

6ETNM .'PARSE FILE SPECIFIER 

101 ;ir CC NO ERRORS 

RO, TYPED ;TELL USER ABOUT BAD FILENAME 

.FCS54 ; 

(SP)* ;RIM0VE RETURN FROM STACK 



•••• I 



••ft 



I SIAj 



START MACRO M1108 14-DEC-77 10:45 PAGE 4-2 



START 
SYMBOL 



MACRO M1108 
TABLE 



U-DEC-77 10:A5 PAGE 4-2 



ATT 
BEGIN 
B0TTT3= 
CMD = 
CUDS = 
EDITS = 
ENDM - 
ERASE S« 
ER.FLGs 
FD.CR - 
FO.RO » 
FO.URT- 
F.DVNM« 
F.FACCs 
F.RATT= 
F.UN1T= 
GETNM = 
G.PRFW* 

. ABS. 



£ ****** 



GX 

000252RG 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
000004 



G.PRPB= 

G.PRPS= 

INFIL = 

INFILN- 

INPBLK^ 

1NP0FN= 

INPTS = 

1NPVER= 

LAST = 

L$SIZE= 

MSGO 

MSG1 

MSG18 

NOINFL^ 

NOINP 

NOPRMT 

NSF = 

N.DVMf- 



000000 
000002 



GX 
GX 
GX 
GX 
GX 
GX 
GX 



•*** 
•*** 
•*•* 
**** 
**** 
**•* 

000206 
OOOOOOR 
000007R 
000063R 
**••*• GX 
001020R 
000502R 
****** GX 
****** GX 



N.UNIT= 

OKNSF 

ONED 

OUTBLK= 

0UTFIL= 

PAGE = 

PARS$S= 

PSAVF 

RNEW1 = 

SAVOFNs 

SAVFI = 

SAVF1L= 

SECNCT 

SECOND 

SECOPN= 

SIZEBFr 

SSON = 



****** GX 

000742RG 
000670RG 
****** GX 
****** GX 
****** GX 
000027 
001232RG 
**«!•** GX 
****** GX 
****** GX 
****** GX 
0001 35R 
00021 3R 



GX 
GX 
GX 



000000 000 
001306 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 2257 WORDS ( 9 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:15 
C37.203START. [37. 30]START/-SP=t37,10]EDPRE. START 



STRTS 
SWlTCHs 
SW2 = 
SYNTAX 
THIS = 
TYPED = 
TYPE IN* 
VERFLGs 
WT 

SBLKON' 
$D1V = 
SDSW = 
fLIMITr 
SOUTON' 
$SETBF= 
$SPSAV= 
SSW1 = 



0004 72R6 
***** GX 
***** GX 

0001 16R 
***** GX 
***** GX 
***** 



***** 
***** 
***** 

***** 



***** 
***** 



GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 



SSW2 = 
$TABON= 
$UPPER= 
$V0N = 
SSSOSTr 
»$$T1 = 
•BEG = 
.ERROR- 
.FCS54= 
.FINIT= 
.GETLN= 
.LAST = 
• NSF 
.OPEN = 
.PREV = 
.THIS = 
.T1DY1= 



****** 



****** GX 

GX 
GX 
GX 



****** 
000006 
000067 
****** GX 
****** GX 
****** GX 
****** 
****** 
****** 

000734RG 
****** G 
****** GX 
****** GX 
****** GX 



G 

GX 

GX 



•••* M S •••• 




•*•• M 5 ttftt 



TTYIO MACRO HIIOB U-OEC-77 10:45 PAGE 2 



H 



.TITLE 
. I DENT 



TTYIO 
fWiV 



COPYRIGHT (C) 1976 

C> COITAL EQUIPKNT CORPORATION. NAYNA»ID, MASS. 

THIS SOFTWARE IS rURNISHED UNDER A LICENSE FOR USE ONLY ON A 
SINGL: COMPUTER SVSTEM AND NAY BE COPIED ONLY WITH THE INCLU- 
SION l)F THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE, OR ANY 
OTHER COPIES THEREOF, MAY NOT BE PROVIDED OR OTHERWISE MADE 
AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH SYSTEM 
AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE TO AND 
OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC. 

THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT 
NOTICE AM) SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS 
SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION M07 

RICHARD HULLY 1-N0V-71 

MODIFIED BYi 



R. MCLEAN 1-MAR-73 

E. R. GORDON 1-OCT-73 

E. R. GORDON 1-MAR-74 

D. N. CUTLER il-AP*!-?* 

D. N. CUTLER if5-JAN-75 

D. N. CUTLER 25-DEC-75 

D. H. CUTLER 20-JUL-76 

D. N. CUTLER 9-JUN-77 



TERMINAL INPUT/OUTF^r ROUTINES 
MACRO LIBRARY CALLS 

.MCALL DIRt.WSIGIS 



OOOQOO 
000003 000 



; LOCAL DATA 
015 001 000 CR:i .BYTE 15.1,0.0 



.'CARRIAGE RETURN WITHOUT CARRIAGE CONTROL 



; 



; ROUTINES TO TYPE JUT MESSAGE ON USER'S TERMINAL 

;♦ 

,' ••-TYPED 

; 

I J5» RO. TYPED 



•t** I 4 •••• 



I -...- : 



TTYIO WACRO H1108 U-DEC-77 10:«5 PAGE 2-1 



li 

60 

6} 000004 

62 000006 

63 000010 
6A 

65 

66 

67 

68 

69 

70 

71 

7? 000012 

71 OOOOU 

7A 000020 



80 
81 
82 

83 000022 

84 000024 

85 000030 

86 000032 

87 000034 
88 

89 
90 
91 
92 
93 
94 
95 

96 000036 

97 000040 

98 000044 

99 000046 




105 000074 

106 900100 
107 



010146 
012001 
000405 



010146 
016601 
000401 



010146 
010167 
105721 
001376 
000424 



010146 
016601 
022121 
010167 
062767 
062101 
020167 

m 




000002 



OOOOOOG 



000002 

OOOOOOG 
000002 

ooooooc 

OOOCiC 
000015 
000C12 

OOOOOOG 

000044 
000013 



TYPED: 



.WORD ADDRESS OF ASCIZ MESSAGE 



.ENABL 

nov 

MOV 
BR 



{♦ 



••-TrpE 



) 
;• 

TYPE: 



MOV 
JSR 



MOV 
MOV 
W 



;♦ 

I 
I 
t 



•♦-TYPEE 

MOV 
JSR 



TYPEE:: MOV 
10S: MOV 
20S: TSTB 
6NE 
BR 



••-TYPLN 



TYPLN: 



OOOOOOG 



231 i 



MOV 
JSR 



MOV 

MOV 

CMP 

MOV 

ADD 

ADD 

CMP 

BMC 

MOVB 

MOVS 

MOVB 



18! I 



OOOOOOG 



C* 

ecQ 

MQV 

CMPB 

BfQ 



LSB 

R1 -(SP) 

(R6)t,R1 

10S 



SAVE R1 

GET ADDRESS OF ASCIZ MESSAGE 

FINISH IN COMMON CODE 



«ADDRESS OF ASCIZ MESSAGE, RO 
RO.TYPE 



Rl,-(SP) 'SAVE Rl 

2(SP).R1 ;GET ADDRESS OF ASCIZ MESSAGE 

10$ .-FINISH IN COMMON CODE 



«ADDRESS OF ASCIZ MESSAGE .Rl 
RO. TYPEE 



R1,-(SP) 

RI.TYPOQI 

(Rl)* 

20S 

50S 



LINE HEADER, RO 
RO. TYPLN 



RI.-(SP) 

2(SP>,H1 

(R1)*,{R1)* 

RI.TYPOOI 

#2,TYP0(II 

<R1)*,R1 

Rl.TYPOai 

25i 

#• .(RD* 

*15.(R1)» 

#12,<R1)» 

:i 

RJ.TYPOQI 

f'l.TYPCR 
*13,-(R1) 
401 



.•SAVE Rl 

.•SET ADDRESS or OUTPUT MESSAGE 

.•SEARCH FOR END OF MESSAGE 

.•IF NE MORE TO GO 

; FINISH IN COMMON CODE 



SAVE Rl 

GET ADDRESS OF LINF HEADER 

POINT TO LENGTH OF LINE 

CALCULATE ADDRESS OF LINE TO OUTPUT 

CALCULATE ADDRESS OF END OF LINE 

NULL LINE? 

IF NE NO 

INS'^RT A BuANK AND 

A CARRIAGE RETURN AND 

A LINE FEEn 

BACK OFF BY ONE (LF) 

BACK UP BY ONE 

AT FRONT OF BUFFER? 

IF EO YES 

ASSUME NO CARRIAGE RFTURN REOUtR'D 

CARRIAGE RETURN REQUIRED? 

IF EQ NO 



•••• C 4 **** 



rrrr. 



TTYIO MACRO MHOB U-DEC-77 10:A5 PAGE 2-2 



lU 000132 

115 000136 

116 000U2 

117 OOOUA 

118 000152 

119 0001 5A 

120 000160 

121 000164 

122 000172 

123 0001 7A 
12A 00020? 
125 00020A 
126 

127 
1?« 
129 
130 
131 
132 
133 
13* 

135 000206 

136 0002U 

137 000220 

138 000226 

139 000234 
UO 0002A2 
U1 000244 

142 000252 

143 000254 

144 000262 

145 000264 

146 000266 

147 000272 

148 000274 

149 000300 

150 000306 

151 000310 

152 000314 

153 000316 

154 000522 

155 000326 

156 000332 

157 000334 

158 000336 

159 000342 

mi 

)354 



005067 OOOOOOG 

122711 000001 

001404 

012767 000040 OOOOOOG 

005201 

166701 OOOOOOG 40$: 

010167 OOOOOOG 



103403 

012601 
000200 



SOS: 



CLR 

CMPB 

BEQ 

NOV 

INC 

SUB 

MOV 

DIRS 

BCS 

DIRS 

MOV 

RTS 

.DSABL 



TYPCR 

#1,(R1) 

40S 

#• .TYPCR 

R1 

TYPOQI.RI 

R1.TYPSZ 

♦TYPOU 

SOS 

«WT 

(SP)*.R1 

RO 

LSB 



••-TYPEIN 

TERMINAL INPUT ROUTINE 



011667 
017767 
062767 

103764 

103760 
122767 
001751 



5t: 

OOOOOOG TYPEIN: 
OOOOOOG OOOOOOG 
000006 OOOOOOG 



OOOOOOG OOOOOOG 



016701 000002G 




016702 
126727 
O'^IOII 

i: '^7 

001404 
105077 
000167 
000167 
005701 
003004 
012701 
116712 

m's 

112722 

062701 

016702 

010142 

105767 

1416 

5202 

5202 

122712 



OOOOOOG 
OOOOOOG OOOOOOG 

OOOOOOG 



OOOOOOG 
OOOOOOG 
OOOOOOG 



000001 
000001G 

000015 
000012 
000002 

ooooodg 

OOOOOOQ 



000012 



« 



ENABL LSB 
WSIGSS 

:M0V aSPJNPAD 

MOV aiNPADJNPSIZ 

ADD #6JNPAD 

DIRS «TYPIN 

BCS TYPEIN 

DIRS «WT 

BCS TYPEIN 

CMPB flE.NODJNPIOS 

BEQ SS 

PUSH R1 

MOV INPI0S*2.R1 

PUSH R2 

MOV INPAD.R2 

CMPB INPIOS.flE.EOF 

BNE 20S 

TSTB SOUTON 

BEQ 10S 

CLRB aCWDS 

JMP EXIT 

JMP B0TT13 



40ti 



MOV 

MOVB 

ADD 

MOVB 

MOVB 

ADD 

NOV 

NOV 

TSTB 

BEQ 

INC 

INC 

CMPB 



#1,R1 

INPI0S*1,(R2) 

R1.R2 

«'1$.(R2)* 

*12.(R2)* 

<'2.R1 

INPAD.R2 

R1.-(R2) 

lilt"" 

R2 

"? 
«12,(R2) 



.-ASSUME NO CARRIAGE CONTROL AT ALL 

.-CARRIAGE CONTROL REQUIRED? 

:IF FQ NO 

.SET BLANK CARRIAGE CONTROL 

.-READJUST TO END OF LINE 

.-CALCULATE LENGTH OF OUTPUT MESSAGE 

.SET LENGTH OF OUTPUT MESSAGE 

.-OUTPUT MESSAGE 

;IF CS DIRECTIVE ERROR 

.-WAIT FOR I/O TO COMPLETE 

; RE STORE SI 

; 



.-WAIT FOR SIGNIFICANT EVENT 
;GET BUFFER ADDRESS 
;GET BUFFER SIZE 

;READ INPUT LINE 

;IF CS TRY AGAIN 

.-WAIT FOR INKJT TO COMPLETE 

.-IF CS TRY AGAIN 

;UNABLE TO ALLOCATE BUFFER? 

;1F EQ YES 

.SAVE REGS 

.-FIND THE CHARACTER COUNT 

;FIND THE BUFFER ADDRESS 

.•CONTROL Z 

;IF NE NO 

.-OUTPUT FILE OPEN? 

'IF EQ NO 

■MAKE SURE NO FILENAME 

;PERFORM AN EXIT 

;N0 OUTPUT FILE JUST EXIT 

.-ONLY A TERMINATOR RETURNED 

'NO 

; COUNT TERMINATOR THEN 

.-PUT TERMINATOR IN BUFFER 

.'STORE A CAR RTN 

; STORE A LINE FEED 

.'UPDATE THE COUNT TO INCLUDE THE CAR RTN 

.'FIND THE BUFFER ADDRESS AGAIN 

;SET THE BUFFER 

.'CONVERT TO UPPER CASE? 

.'IF EQ NO 

; ADJUST ADDRESS 

.'POINT TO NEXT CHARACTER 

;ENO OF LINE? 



••*• D ^ tct* 



I 1 1 » in 



MAfttfiMiifta ii.-ft..r.y7 ift.n PAfti 3-s 



TTXIO MACRO M1108 U-DEC-77 10:A5 



171 OOOAIO 

172 000A12 

173 000416 

174 000420 

175 000A24 

176 000426 

177 000432 

178 000434 

179 000436 

180 000440 

181 000444 

182 000446 

183 000452 

184 000454 
185 

186 
187 



001411 

122712 000141 

101371 

122712 000172 

103766 

142712 000040 

000763 



105767 0000016 
001003 

004067 177332 
000000* 
000200 



PAGE 2-3 








BEQ 


50$ 




CMPB 


#141. (R2) 




BHI 


40$ 




CMPB 


#172.(R2) 




BLO 


40$ 




BICB 


#40, (R2) 




BR 


40$ 


501: 


POP 


R2 




POP 


R1 




TSTB 


INP10S*1 




BNE 


60$ 




JSR 


RO, TYPED 




.WORD 


CR 


60$: 


RTS 


RO 




.DSABL 


LS8 



IF EQ YES 

LOWER CASE? 

IF HI NO 

LOWER CASE? 

IF LO NO 

CONVERT TO UPPER CASE 



LINE TERMINATED BY COUNT? 

IF NE NO 

ECHO CARRIAGE RETURN 



000001 



.IND 



•*«ii ( 4 ••*• 



T1Y10 MACRO M110B 14-DEC-77 10:45 PAGE 2-4 



TTYIO MACRO Ml 108 
SYMBOL TABLE 

B0TT13= ••••«♦ GX 
CR OOOOOORG 
CWOS = ••*••♦ GX 
EXIT = *♦♦••• GX 
IE.EOF= •♦•♦•♦ GX 



. ABS. 000000 000 
000A56 001 
ERRORS DETECTED: 



U-DEC-77 10:45 PAGE 2-A 



IE.NOD= 


****** 


GX 


TVPCR = 


****** GX 


INPAD = 




GX 


TYPE 


00001 2RG 


INP10S= 


****** 


GX 


TYPED 


000004RG 


INPSI2= 


****** 


GX 


TYPEE 


000022RG 


LSS1ZE= 


000206 




TYPE IN 


0002UR6 



TYPIN = •••♦•• GX 
TYPLN 000036RG 
TYPOQI= **t*** GX 
TYPOU = ♦♦♦♦♦* GX 



TYPSZ = •*•♦♦* GX 
WT = ****** GX 
SOUTON= •♦♦•*• GX 
$UPPER= *♦♦*♦♦ GX 



VIRTUAL MEMORY USED: A38 WORDS ( 2 PAGES) 
DYNAMIC MEMORY: 1574A WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:08 
C37.20]TTYIO.t37.30]TTYIO/-SP=C37.10]EDPRE. TTYIO 



•••• f 4 •**• 




•*•• 6 4 ••*• 



UNSAV HACW mi08 U-DEC-r? 10:«5 PAGf 2 



UNSAV MACRO M1108 U-OEC-77 10:A5 PAGE 2 



1 



46 000000 

47 000004 

48 000012 

50 000020 

51 000026 

i2 



000204 

OOOOOOG JOOOOSC 
OOOOOOC 




004767 
012767 
004767 
103003 
012767 
152767 
152767 



05067 

105067 QOCOOOG 
016702 OOOOOOG 
011201 



.TITLE UNSAV 
. I DENT /M03/ 



COPYRIGHT (C) 1976 

DIGITAL EQUIPMENT CORPORATION. NAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A 
SINGLE COMPUTER SYSTEM AM) MAY BE COPIED ONLY WITH THE INCLU- 
SION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE, OR ANY 
OTHER COPIES THEREOF, MAY NOT BE PROVIDED " OTHERWISE MADE 
AVAILABLE TO ANY OTHER PERSON EXCEPT FOR U ON SUCH SYSTEM 
AND TO ONE WHO AGREES TO THESE LICENSE ^..>AS, TITLE TO AND 
OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC. 

THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS 
SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION M03 

RICHARD HULLY 1-N0V-71 

MODIFIED BY: 

; R. MCLEAN 1 -MAR- 73 

* E. R. GORDON 1-OCT-73 

i E. R. GORDON 1-MAR-74 

t D. N. CUTLER 21-APR-74 

D. N. CUTLER 25-DEC-75 

UNSAVE FUNCTION 

MACRO LIBRARY CALLS 



.MCALL CLOSES. GETtS.OPENtR 



SERVIC AN UNSAVE REQUEST 



UNSAVE I 



OOOOOf';! OOOOOOC 
"JOOQ OOOOOOG 4»: 
}OUOG OOOOOOG 




••CALL 10$ ; CLOSE SAVE FILE 

MOV «INPDFN,SAVBLKtF.DFNB .-DON'T USE DEFAULT 

CALL PSAVF ;PARSE SAVE riLE SPECIFIER 

BCC 41 ;IF CC FILE SPECiflFO 

MOV fSAVDFN.SAVBLK^F.DFNB :RESrORE POINTER TO NAMEBLOCK 

BISB ffSAVNSF.ER.FLG ;SET SAVE FILE SWITCH 

B1S8 HOPENB.ER.EXT :SET SECONDARY FILE SWITCH 

OPEI^tR fSAVBLK ERROR :OPEN SAVE FILE 

CLRB ER.FLG ; CLEAR FLAG 

CLRB ER. EXT .-CLEAR FLAG 

MOV THIS.R; .-READ A LINE FROM SAVE FILE 

MOV (R2),Rf ;TME LINE SIZE 



•••* H 4 ••*• 



UNSAV MACRO M110B 14-DEC-77 10:45 PAGF 2-1 



UNSAV MACRO Ml 108 U-DEC-77 10: A5 PAGE 2-1 



SB 0001 OA 

59 000110 

60 000116 

61 OOOUA 

62 000150 

63 0001 5A 

64 000156 

65 000162 

66 000166 

67 000170 

68 000172 

69 000176 

70 000202 

71 000206 

72 000210 

73 000226 
7A 

75 



062702 000006 

152767 OOOOOOG OOOOOOG 



105067 
105760 
100415 
016001 
062701 
010U2 
060102 
112722 
112712 
004067 
000733 

000207 

000001 



OOOOOOG 
OOOOOOG 

OOOOOOG 
000002 



000015 
000012 
OOOOOOG 



10$: 



ADD 

BISB 

GETSS 

CLRB 

TSTB 

BMJ 

MOV 

ADD 

MOV 

ADD 

MOVB 

MOVB 

JSR 

BR 

CLOSES 

RETURN 

.END 



«6,R2 ;THE REAL BEGINNING OF THE LINE 
#EOFB,ER.FLG ;SET END OF FILE LEGAL 
/rSAVBLK,R2,R1,. ERROR 



ER.FLG 




.•CLEAR FLAG 


F.ERR(RO) 




;END OF FILE RETURN 


10S 




;VES 


F.NRBD(RO) 


.R1 


:FIND THE SIZE OF THE LINE 


#2.R1 




; INCLUDE A CR LF 


R1.-(R2) 




; STORE LINE SIZE 


R1,R2 
#15.(R2)» 










#12, (R2) 






RO. OUTPUT 




;OUTPUT CURRENT LINE AND SWITCH BUFFERS 


3S 




;GET NEXT LINE 


«SAVBLK,. ERROR 


.•CLOSE SAVE FILE 



•••• I 4 •••* 



I UNSAV MACRO M110B U-r>EC-77 10:45 PAGF 2-2 



UNSAV MACRO M1108 H-DEC-77 10:A5 PAGE 2-2 
SYMBOL TABLE 

EOFB = •♦•**♦ GX F.ERR = ♦•**♦• GX 

ER.EXfs •**••* GX F.FACC= **••♦♦ GX 

ER.FLG= •••*•• GX F.NRBD= ♦**♦*♦ GX 

FO.RD = ••♦•♦• GX F.URBD= *♦•*♦• GX 

F.DFNB= *••••♦ GX INPOFN= *♦♦•♦• GX 

. ABS. 000000 000 
000230 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 119? WORDS ( 5 PAGES) 
DYNAMIC MEMORY: 157A4 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:08 
C37.203UNSAV,t37.303UNSAV/-SP=[37.10]EDPRE.UNSAV 



LSSIZE= 000206 
OPENB = ♦♦*»•• GX 
0UTPUT= *••♦•• GX 
PAR$$S^ 000027 
PSAVF = ♦♦♦*•• GX 



SAVBLKr ♦**••* GX 
SAVDFN= ♦♦*♦•♦ GX 
SAVNSF= •♦•*•• GX 
THIS = ♦♦*♦»• GX 
UNSAVE OOOOOORG 



$$ST1 = 000067 
.CLOSE= •»♦♦«• G 
•ERRORS ****** GX 
.GETSQ= ♦•*••* G 
.OPEN = *♦•••* G 



•••• J ^ •••« 



N \ 




•••• K ^ tt** 



SLPCUr MfHOmiOB U-OEC-77 10:«? PAGf ? 




.TITLE SLPCRf 
.IDENT /08.01/ 



COPYRIGHT (C) 1975.1976,1977 

DIGITAL EQUIPMENT CORPORATION, NATNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A 
SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE 
INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THI SOFTWARE, OR 
ANY OTHER COPIES THEREOF, MAY NOT BE PROVIDED OR OTHERWISE 
MADE AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH 
SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE 
TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN 
IN DEC. 

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF 
ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION 08.01 

♦•-SEQUENCE: CM001 

DESCRIPTION: 

ADD USER-SELECTABLE AUDIT TRAIL 

AUTHOR: C. A. MONIA 

FILES MODIFIED: 

ERSLP 

GETLN 

GTSLP 

lOSLP 

POSIT 

SLPR11 

SLPSB 

••-SEQUENCE: CMOO? 

DESCRIPTION: 

ALLOW USER TO SET LISTING PAGE SI7F AT BUILD TIME 

AUTHOR: C. MONIA 

FILES MODIFIED: 

PUTLN 

••-SEQUENCE: CM003 



•••* L ^ ••«« 



SlPtRF MACRO MHOS U-0FC-'7 10:*5 PAGF ?-1 



SLPCRF MACRO Ml 108 U-OEC-77 10:«5 PAGE 2-1 



000001 



DESCRIPTION: 



ADD /CM SWITCH TO DELETE AUDIT TRAILS. 
NESTED INDIRECT FILES. 

AUTHOR: C. MONIA 

FILES MODIFIED: 

lOSLP 

SLPR11 

SLPSB 

^•-SEQUENCE: EB029 

DESCRIPTION: 



INCREASE DEPTH OF 



SET GE.LC IN BYTE G.MODE OF GCML CONTROL BLOCK TO ALLOW 
PASSING OF LOWER-CASE CHARACTERS FROM THE CORRECTION FILE 
TO THE OUTPUT FILE. 

AUTHOR: E. BAATZ 

FILES MODIFIED: 

SLPR11 



.END 



•••• n 4 •«•« 



SlPtUr MACRO M1108 U-0fC-T7 10(45 PAOf ?•? 



SLPCRF MACRO Ml 108 U-OEC-77 10: A5 PAGE 2-2 
SYMBOL TABLE 



. ABS. 000000 000 
000000 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 30A WORDS ( 2 PAGES) 
DYNAMIC MEMORY: 157AA WORDS ( 60 PAGES) 
ELAPSED TIME: 0C:00:0A 

CAO.2O]SLPCRF.[A0.3O3SLPCRF/-SP=CA0.10]MACH. SLPCRF 
kS 



••*• N 4 •••* 




•••• I 5 **** 



CMPRS MACRO MV ^8 U-DEC-77 10:A5 PAGE 2 



.TITLE CMPRS 
.IDENT /04/ 



1 

r 

12 

II 

16 
17 

]i 

20 
21 
22 
23 
?<i 
25 
26 
27 
28 
29 
30 
11 



COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD, MASS. 
COPYRIGHT 1975, DIGITAL EQUIPMENT CORP.. MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE 
ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION 
OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT 
AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC. 

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY 
OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION OA 

D.N. CUTLER 4-JAN-72 

COMPRESS LINE 

LOCAL MACROS 

JUMP ON NO DIGIT 

JOND ADDR 

ADDR*ADDRESS TO JUMP TO IF NO DIGIT 



.MACRO 

MOVB 

CMPB 

BGT 

CMPB 

BLT 

.ENDM 



JOND ADDR 

fR1)»,R5 

R3,R5 

ADDR 

R4,R5 

ADDR 



JUMP ON NO LETTER 
JONL ADDR 

ADDR'ADDRESS TO JUMP TO IF NO MATCH 



.MACRO 

MOVB 

CMPB 

BNE 

.ENPM 



JONL ADDR 
(R1)*.R5 
(R«)*.R5 
ADDR 



*«t« r ) •«•• 



CMPRS MACRO M1108 U-OEC-77 10:A5 PAGE 2-1 



58 

59 

60 

61 

62 

000003 

000006 

000011 

63 

64 

65 

66 

67 

68 

69 

70 

71 

72 

73 

74 

75 

76 

77 

78 

79 

80 

81 

82 

83 

84 

85 

86 

87 

88 

89 

90 

91 

92 

93 

94 

95 

96 

97 

98 

99 

100 

101 

102 

105 

1 

1 

1 

1 

1 

1. 
110 
111 



000000 
073 
055 
052 



000014 
000020 
000024 
000026 
000030 
000034 
000040 
000044 
000050 
OOOOW 
000054 
000062 
000070 
000076 
000102 
000106 
000120 
000132 
000144 

18 

164 
166 
174 
1202 
10 




000 Oil 

052 052 

105 127 
052 



012701 0000006 

010100 

112105 

012704 000000* 



122405 
001364 



012703 000060 

012704 000071 



000417 

122705 000116 

001017 



LOCAL DATA 



040 CNTRL: .BYTE 0,11/ .•;.•♦,'*, •-.'E/W.'*, '•; 



.EVEN 



}♦ 



**-tC|iV>RS-COnPRESS LINE 

THIS ROUTINE COMPRESSES THE LINE IN SLNBUF AND APPENDS ";**-DDDD" IF 
APPROPRIATE. THL LINE IS SCANNED AND TRAILING BLANKS, HORIZONAL TABS, 
AND ";*»NEW»»" OR ";**-DDDD" ARE DELETED. IF A LINE DELATION (I.E. 
-N.M) HAS NOT VET BEEN EDITED (SLNOEL NONZERO), THEN THE LINE IS 
PADDED TO THE RIGHT MARGIN AND ";**-" IS APPENDED. ILNDEL IS CONWERTED 
TO ASCII AND APPEf::«ED IMMEDIATELY FOLLOWING THE "-". 



INPUTS: 



LINE IN SLNBUF. 



; OUTPUTS: 

; 

I THE LINE IN SLNBUF IS COMPRESSED AND SLNDEL IS SET TO ZERO. 



SCMPRS::SAVRG 
MOV 



I 



4li 



112105 
105 



705 



8 



MOV 
MOVB 

3ft 

JOL 

cMpe 

BNE 

JONL 

JONL 

JONL 

MV 

MOV 

JOND 

JOND 

JONP 

JOND 

BR 

CMPB 

BNE 

JONL 

JONL 

JONL 

JONL 

MOVB 

TSTB 





•SAVE NONVOLITILE REGISTERS 


«SLNBUF.R1 


;GET ADDRESS OF LINE BUFFER 


R1,R0 


•SAVE ADDRESS OF NEXT BYTE 


(R1)*.R5 


•GE( NEXT BYTE 


#CNTRL,R4 


•GET ADDRESS OF CONTROL BYTE STRING 


8S 


•0? 


2S 


•NT? 


2S 


SPACE? 


(R4)»,R5 


1 * * ■ * *<9 

« 


IS 


•IF NE NO 


7S 


. ' '♦' ••» 


7S 




4S 


•'••**> 


#*0.R3 


'ETLOW LiMlT 


{•9.R4 


SET " IH LIMIT 


7S 


DU. ■ . 


6S 


DIGIi? 


68 


DIGIT? 


6S 


DIGIT? 


5S 




#*N.R5 


'V*? 


'S 


IF NE NO 


7S 


"E"? 


3 


•XI, 


7S 


"♦"? 


(R1)».R5 


GEi NEXT BYTE 


R5 


ZERO BYTE? 



*••• p 5 ••«• 



CI»»RS MACRO nil 08 H-OEC-77 10: A5 



112 000222 

113 00022A 
1U 000226 

115 000230 

116 00023A 

117 000236 

118 0002A0 

119 0002AA 

120 0002A6 

121 000250 

122 00025A 

123 000256 
12A 000262 

125 000266 

126 000270 

127 000272 

128 000276 
129 

130 
131 

132 000312 

133 000316 

134 000320 

135 00032A 

136 000330 

137 000332 

138 000336 

139 0003A2 
UO 

HI 



00U02 
1057A1 
000676 
005767 
001 A35 
005001 
012702 
020200 
103011 
122227 
001 OOA 
0A2701 
062701 
005201 
000765 

01270A 
OOOOOA 



016701 
005002 

005067 
105010 
162700 
010067 



000001 



OOOOOOG 



OOOOOOG 



000011 

000007 
000007 



000003* 



OOOOOOG 



OOOOOOG 

OOOOOOG 
OOOOOOG 



PAGE 2-2 








BEQ 


8S 


7$: 


TSTB 


-(R1) 




BR 


1S 


8S: 


TST 


SLNDEL 




BEQ 


12S 




CLR 


R1 




NOV 


f$LN8UF.R2 


9S: 


CMP 


R2,R0 




BHIS 


11$ 




CMPB 


(R2)*,*11 




BNE 


10$ 




BIC 


#7.R1 




ADD 


#7.R1 


10»: 


INC 


R1 




BR 


9$ 


11$: 


CALL 


$PADLN 




MOV 


#CNTRL*3.RA 




.REPT 


A 




MOVB 


(RA}t.(R0)t 




.ENDR 






MOV 


$LNDEL,R1 




CLR 


R2 




CALL 


$CBDMG 




CLR 


$LNDEL 


12S: 


CLRB 


(RO) 




SUB 


«$LNBUF,R0 




MOV 


R0.$LNDES 




RETURN 





IF EQ YES 

BACK UP BYTE ADDRESS 

GO AGAIN 

ANYTHING TO DELETE? 

IF EQ NO 

CLEAR HORIZONAL POSITION 

GET ADDRESS OF LINE BUFFER 

ANY MORE TO SCAN? 

IF HIS NU 

HORIZONAL TAB? 

IF NE NO 

CLEAR EXCESS BITS 

CALCULATE NEXT TAB STOP 

INCREMENT HORIZONAL POSITION 

PAD LINE TO RIGHT MARGIN 
APPEND PART OF SUFFIX 



GET NUMBER OF LINES DELETED 

SUPPRESS ZEROS 

CONVERT TO DECIMAL 

ZERO NUMBER OF LINES DELETED 

SET ZERO SENTINEL BYTE 

CALCULATE LENGTH OF LINE 

SET LENGTH FO LINE IN BYTES 



.END 



•••• t 5 **** 



nAfkn Mima u.nrr«77 lOtiS pacf P-1 



CMPRS MACRO m 108 1A-DEC-77 10:A5 PAGE 2-3 
SYMBOL TABLE 

CNTRL OOOOOOR $CI«IPRS 0000UR6 $LNDEL= ♦•♦**♦ 6X SPADLN= •••♦♦♦ 6X SI = 000001 
$CBOWG= ••♦**♦ GX $L^eUF= ••••♦* GX SLNDES= ••**♦* GX $SAVRG= «•*♦•♦ 6X 

. ABS. 000000 000 
00034A 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 5A5 WORDS ( 3 PAGES) 
DYNAMIC MEMORY: 157AA WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:08 
CAO,203CMPRS.W0,3O]CMPRS/-SP=U0.103MACFL.CMPRS 



•••• f 5 ••«« 




••*• 6 5 ***• 



KBM» MArnn MIIOH U-DFC-77 10:4^ PAGE 2 



ERSLP MACRO Ml 108 U-DEC-77 10:45 PAGE 2 



000000 
000001 
00000? 



.TITLE ERSLP 
.IDENT /06/ 



COPYRIGHT (C) 1975,1976.1977 

DIGITAL EQUIPMENT CORPORATION, MAVNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A 
SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE 
INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE, OR 
ANY OTHER COPIES THEREOF. MAY NOT BE PROVIDED OR OTHERWISE 
MADE AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH 
SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE 
TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN 
IN DEC. 

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF 
ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION 06 

D.N. CUTLER 8-JAN-73 

MODIFICATIONS: 

C. MONIA 17-SEP-75 

CM001 — ENHANCE LINE LOCATION, ADD USER AUDIT TRAIL 

JAK001 ?«-AUG-77 ADD EXIT WITH STATUS 

ERROR MESSAGE ROUTINE 
EQUATED SYMBOLS 



StVO»0 
S$V1««1 
SlV?"? 



MACRO LIBRARY CALLS 



;SEV 0>DiAGNOSTIC MESSAGE 

;SEV 1«D1AG IF TERM IN/FATAL IF NOT 

;SEV ?=FATAL ERROR 



.MCALL DIRS. CLOSES. Q10t,RCMLt.WTSEIS 

LOCAL MACROS 

ERROR MESSAGE DEFINITION 

ERM NUM, FORMAT 



ERSLP MACRO M1108 U-DEC-77 10t<i5 PAGF ?-1 



ERSLP »<ACRO mi08 U-DEC-77 10:45 PAGE 2-1 



WHERE : 



NUM-ERROR NUMBER. 

FORMAT^ERROR MESSAGE FORMAT STATEMENT. 



.MACRO ERM NUM. FORMAT 
ESR'NUM=»NUHV 



.PSECT 

.ASCIZ 
.PSECT 
.=ERMSG»<2*NUMV 
.yORD 
.PSECT 
.ENDM 



LOCAL DATA 



80 000000 






81 000006 






82 000000 






83 000000 


045 


116 


000003 1W. 


120 


040 


000006 055 


055 


040 


000011 052 


104 


111 


OOOOU 101 


107 


052 


000017 055 


000 




84 000000 






85 000000 






86 000000 






87 000036 






88 000036 






89 000036 






90 000036 






91 000036 






92 000036 






93 000036 






94 000036 






95 000036 






96 000036 






97 00^36 






98 r 036 






.SSSoiilJS 






101 000036 






102 000036 






103 000036 

104 000036 






105 000036 






106 0(0036 






107 0(0052 






185 fe 







ARGBK: 
MGQIO: 

123 DIAG: 



.BLKW 
QIOS 
.PSECT 
.ASCJ2 



ERMSG: 



IRMSOt 



ERM 
ERM 
ERM 
ERM 
ERM 
ERM 
ERM 
ERM 
ERM 
ERM 
ERM 
ERM 
ERM 
ERM 
ERM 
ERM 
ERM 
ERM 
ERM 
ERM 
ERM 
.PSECT 



TXT 

7F0RMAT? 

ER 

> 

SS 



3 ; LOCAL ARGUMENT BLOCK 

IO.WVB.2,1,..,<,,40> ; MESSAGE OUTPUT OPB 

TXT 

/INSLP — •OIAG*-/ ; DIAGNOSTIC PREFIX 



; CM001 
; CM001 



.PSECT ER 



0.* 

1.» 

\> 

4.* 
5.* 
6.* 
7.* 
8.* 

i6. 
11. 

16. 

1^ 

18. 
19. 
20. 

ER 



.PStCT TXT 



:REF LABEL 
OPEN FAILURE CORRECTION INPUT FILE SX* 
OPEN FAILURE LINE LISTING FILE XX* 
OPEN FAILURE SOURCE OUTPUT FILE U* 
PREMATURE EOF CORRECTION INPUT FILE IX* 
ILLEGAL GET COMMAND LINE ERROR CODE* 
I/O ERROR COMMAND INPUT FILE* 
INDIRECT FILE OPEN FAILURElNlVA* 
INDIRECT COMMAND SYNTAX ERRORINIVA* 
INDIRECT FILE DEPTH EXCEEDEDXNIVA* 
I/O ERROR SOURCE OUTPUT FILE IX* 
*I/0 ERROR LINE LISTING FILE IX* 
*ILIEGAL SUITCHXNIVA* 
•ILLEGAL FILENAMEINIVA* 
•ILLEGAL DEVICE NAMEINIVA* 
•COMFUND SYNTAX ERRORINIVA* 
•PREMATURE EOF COMMAND INPUT FILE* 
*I/0 ERROR CORECTION INPUT FILE IX* 
•ILLEGAL DIRECTORYINIVA* 
*|/0 ERROR COMMAND OUTPUT FILE* 
*ILLEGAL ERROR/SEVERITY CODE IP IP IP* 
•LINE NUMBER ERRORINIVA* 

;REF LABEL 



•••* I 5 ***• 



rR<;iP NUCnn MIIOR U-DFC-77 10:45 PAGE 2-2 



ERSLP MACRO MHOS U-OEC-77 10: A5 PAGE 2-2 



110 
001 25A 
001237 
001242 
001 2A5 
001250 
111 
001256 
001261 
112 
113 
1U 
115 
116 
117 
118 
119 
120 
121 
122 
123 
124 
125 
126 
127 
128 
129 
130 
131 
132 
133 
134 
135 
136 
137 
138 
139 
UO 
U1 

U3 
U4 
U5 
146 
147 
148 
149 
150 
151 

153 
154 
155 

\^ 
US 



001231 
114 
055 
052 
124 
052 

001253 
045 
045 

000036 



000036 
000042 
000044 
000046 
000050 
000052 
000054 
000060 
000062 
000066 
000070 
000072 
000076 
000100 
104 

114 

ii 

ma 



045 
120 
055 
106 
101 
055 
045 
126 
116 



116 
040 
040 
101 
114 
000 
062 
101 
000 



123 FATAL: .ASCIZ /XNSLP ~ *FATAL*- 



FATAL PREFIX 



CN001 



116 CMID: 



005005 
150105 
005004 
000301 
150104 

020527 000025 
002007 
020427 000002 



006305 

005765 000000' 

001013 

012700 000004' 

016610 000010 

010240 

000301 

010140 

010002 

012701 

023 002 
000746 
016703 OOOOOOG 



.ASCIZ /X2NSVASN/ 



•PSECT 



**-SERMSG-ERROR MESSAGE ROUTINE 

THIS ROUTINE IS CALLED TO OUTPUT AN ERROR MESSAGE. THE SEVERITY OF 
THE ERROR IS USED TO SE. "^CT A PREFIX THAT IS TO BE OUTPUT WITH IHE 
MESSAGE. THE ERROR NliMB. < SPECIFIES AN ERROR FORMAT WHICH IS PASSED 
TO SEDMSG 10 EDIT THE ERROR MESSAGE. THE RESULTANT ERROR MESSAGE IS 
THEN OUTPUT USING THE ROUTINE ERRORS. IF THE SEVERITY OF THE ERROR 
IS 2, ABIRT IS SET, OR THE SEVERITY OF THE ERROR IS 1 AND THE INPUT IS 
NOT COMMING FROM A TERMINAL, THEN THE CURRENT EDIT IS TERMINATED. ELSE 
A RETURN TO THE CALLER IS EXECUTED. 



INPUTS: 



R1 'ERROR/SEVERITY NUMBERS. 
R2«ARGUMENT BLOCK ADDRESS. 



10S: 



20S: 



SO? I 



JTS: 
IF THE 


SEVERITY OF 


rHE ERROR IS FATAL. THEN THE CURRENT EDIT 


IS TERMINATED BY A JUMP 


ro »RSTRT. 


:SAVRG 






■SAVE NONVOLITILE REGISTERS 


CLR 


R5 






BISB 


R1.R5 




GET ERROR NUMBER 


CLR 


R4 






SWAB 


R1 




SWAP HALVES 


BISB 


R1,R4 




GET SEVERITY 


CMP 


R5.#<ERMS6E- 
20i 


■ERMSG>/2; LEGAL ERROR NUMBER? 1 


BGE 




IF GE NO 


CMP 


RMS»V2 




LEGAL SEVERITY? 


BGT 




IF GT NO 


ASL 


R5 




CONVERT ERROR NUMBER TO INDEX 


TST 


ERMSG(R5) 




ANY MESSAGE THIS NUMBER? 


6NE 


301 




IF NE YES 


MOV 


«ARG6K*4.R0 




GET ADDRESS OF ARGUMENT BLOCK 


MOV 


1Q(SP).(R0) 
R2.-(R6) 




STORE ADDRESS OF CALLER 


MOV 




STORE ARGUMENT BLOCK ADDRESS 


SWAB 


R1 




RESTORE R1 


MOV 


R1,-(R0) 




STORE ERROR, SEVERITY 


MOV 


R0.R2 
(PC)*,R1 




SET ARGUMENT BLOCK ADDRESS 


MOV 




GET ERROR, SEVERITY 


J*^f 


;};i«.$iv2 




FATAL -NO RETURN 


BR 




GO AROUND AGAIN 


MOV 


ICMIPT,R3 




GET COMMAND INPUT RECORD BLOCK 



• Mft J 5 **** 



ERSLP MACRO Ml 108 14-DEC-77 10:45 PAGF 2-3 



ERSLP MACRO Ml 108 U-OEC-77 10: A5 PAGE 2-3 












160 000132 


132763 


OOOOOOG GOOOOOG 




BITB 


#FD.TTy.F.RCTL(R3); TERMINAL DEVICE? 




, 


161 OOOUO 


00520* 






INC 


R* 


.-INCREMENT SEVERITY 






162 000U2 


012701 


000000* 


*0S: 


MOV 


/VDIAG.Rl 


.-ASSUME DIAGNOSTIC MESSAGE 






163 000H6 


020*27 


000002 




CMP 


R*.#2 


.-FATAL ERROR? 






16A 000152 


002*02 






BLT 


50$ 


.-IF LT NO 






165 00015* 


012701 


001231' 




MOV 


«FATAL,R1 


;GET ADDRESS OF FATAL MESSAGE 






166 000160 


012700 


OOOOOOG 


50$: 


MOV 


#$OUTBF,R0 


.GET ADDRESS OF OUTPUT BUFFER 






167 00016* 








CALL 


$EDMSG 


; FORMAT PREFIX 


CM001 




168 000170 


016501 


000000* 




MOV 


ERMSG(R5},R1 


.-GET ADDRESS OF FORMAT STATEMENT 


K.ITV\/ I 




169 00017* 








CALL 


$EDMSG 


;EDIT MESSAGE 






170 000200 


010001 






MOV 


R0,R1 


.COPY ENDING ADDRESS 






]IX 000202 


012700 


OOOOOOG 




MOV 


#$OUTBF,R0 


.-GET ADDRESS OF OUTPUT BUFFER 






172 000206 


160001 






SUB 


R0.R1 


; CALCULATE LENGTH OF MESSAGE 






173 000210 








CALL 


$MGOUT 


.OUTPUT ERROR MESSAGE 






17* 00021* 


103*36 






BCS 


70$ 


.-IF CS I/O ERROR 






175 000216 


012701 


001253* 




MOV 


/rCMID.R! 


.- GET CONiROL STRING 


CM001 




176 000222 


012702 


OOOOOOG 




MOV 


«$HDSIZ.R2 


; GET FORMAT CONTROL BLOCK 


wnvw 1 

CM001 




177 000226 


005712 






TST 


(R2) 


.- ANY STRING TO PRINT? 


CM001 




178 000230 


001*15 






BEQ 


65$ 


; IF EQ NO • 


CMOOl 
CM001 




179 000232 


012700 


OOOOOOG 




MOV 


nOUTBF.RO 


.- GET OUTPUT BUFFER ADDRESS • 




180 000236 








CALL 


$EDMSG 


; FORMAT STRING 


CM001 




181 0002*2 


010001 






MOV 


RO.RI 


.- COPY ENDING ADDRESS ] 


wnvv 1 

CMOOl 




182 0002** 


012700 


OOOOOOG 




MOV 


nOUTBF.RO 


; GET BUFFER ADDRESS 


CMOOl 




183 000250 


160001 






SUB 


R0.R1 


; COMPUTE MESSAGE LENGTH 


CMOOl 




18* 000252 


162701 


000006 




SUB 


#6.R1 


; STRIP OFF CR-LF PAIRS 






185 000256 








CALL 


$M60UT 


; OUTPUT MESSAGE 


CMOOl 




186 000262 

187 00026* 


103*13 




65S: 


BCS 


70$ 


; IF C/S EXIT QUIETLY ; 


LM001 
CM001 




188 00026* 


020*27 


000002 




CMP 


R*.«2 


; FATAL «RROR' ' 




189 000270 


002010 






8GE 


70i 


;IF GE YES 






190 000272 

191 000300 


022767 
101*03 


OOOOOOG OOOOOOG 




CMP 
BLOS 


fEX$ERR,$EXSTS 
66$ 


; WORSE ERROR OCCURRED? 
; IF LOS YES 




-JAKOOl 

•JAX001 

•JAK001 

JAK001 


192 000302 

193 000310 
19* 000310 
195 

196 
197 
198 


012767 


OOOOOOG OOOOOOG 


66$: 


MOV 
RETURN 


#EX$fcRR.$EXSTS 


; SET EXIT STATUS 








; FATAL 


ERROR-TERMINATE CURRENT 


EDIT 






199 

200 000312 






70ti 










JAK001 
JAKOOI 


201 000312 

202 000320 

203 000330 

205 000350 
208 

fCo 

211 


012767 


OOOOOOG OOOOOOG 




MOV 


#lX$SEV.$EXSTS 


. jET exit status 










CLOSE$ 
CLOSE$ 


$CF|PT 
$LSTPT 


; CLOSE CORRECTION OUTPUT FILE 
,-CLOSE LINE LISTING FILE 




JAK001 
♦ •-1 








CLOSE$ 


$SRCPT 


.-CLOSE SOURCE OUTPUT FILE 






000167 


OOOOOOG 


RC«l$ KMIPT .-RESET TO STACK LEVEL ZERO 
JMP $RSTRT .-RESTART 

; ••-$«GOUT-SEND A MESSAGE TO THE TERMINAL DEVICE ; 
) INPUTS: i 


a 




21* 

m 








RO>BUFFER ADDRESS 


• 


CM(0 










R1»BVTE 


COUNT 




CMOO 








.' OUTPUTS: 






CMOOl 





••*• 



FT 



•••• 



FRSIP MACRO Wn OR U-DFf-V 10*S PAGF ?-* 



ERSLP MACRO Ml 108 U-DEC-77 10- A5 PAGE 2-A 



217 
218 
219 
220 
221 
222 
225 
22A 
225 
226 
227 
228 
229 
230 
231 



C/CLEAR - MESSAGE TRANSMITTED TO DEVICE ASSIGNED TO LUN 2 
C/SET - QIO DIRECTIVE ERROR (LUN UNASSIGNED) 



00036A 


010067 


177A32 


SMGOUT: 


:M0V 


R0,MGQIO*Q.IOPL ; SETUP BUFFER ADDRESS 


000370 


010167 


177430 




MOV 


R1.M6QI0tQ.I0PL*2 ; SETUP BYTE COUNT 


00037A 








DIRS 


«MGQIO ; ISSUE QIO 


000402 


103A05 






BCS 


10» ; IF C/S QIO FAILED 


00040A 








WTSESS 


#1 ; WAIT ON EFN 1 


000416 






10$: 


RETURN 


i 



CM001 
CM001 
CM001 
CM001 
CM001 

CM001 
CM001 
CM001 
CM001 
CM001 
CM001 



000001 



.END 



•••• I s t*«« 



mSLP MACRO Mil 08 U-DIC-77 10:45 PAGf ?-5 



ERSLP MACRO Ml 108 
SYI«QL TABLE 



U-OEC-77 10: A5 PAGE 2-5 



ARGBK 
CMID 
DIAG 
ERMSG 
ERMSGE 
EXSERR" 
EXSSEV^ 
EtRO - 
ESR1 ' 
ESR10 > 
E$R11 = 
EtR12 > 
EtR13 < 

. ABS. 



OQOQOQR 
0O1253R 



000052R 

000000 
000001 
000012 
000015 

oooou 

000015 



GX 

GX 

G 

G 

G 

G 

G 

G 



000000 
000420 
TXT 001 26A 
ER 000052 
ERRORS DETECTED: 



002 
002 



ESRU 
ESR15 
__ EJR16 
003 E$R17 
003 ESR18 
ESR19 
E$R2 
ESR20 
ESR3 
ESRA 
EtR5 
ESR6 



000 
001 
002 
003 



000016 
000017 
000020 
000021 
000022 
000023 
000002 
000024 
000003 
000004 
000005 
000006 



E$R7 = 

ESR8 = 

ESR9 r 

FATAL 

FD.TTy= 

F.RCTL= 

IO.UVB» 

MGQIO 

PARStt* 

Q.IOAE<= 

O.lOEFs 

Q.IOFNc 



000007 6 


Q.IOLUr 


000004 


$HDSIZ= 


****** GX 


sms 


O.IOPL' 


000014 


SLSTPTs 


****** GX 


Q.IOPR= 


000007 


SMGOUT 


000364RG 


01 1231R 


002 Q.I0SB= 


000010 


$0UTBF= 


****** GX 


****** GX 


SSVO = 


000000 G 


$RSTRT= 


****w* GX 


****** GX 


S»V1 = 


000001 G 


$SAVRG« 


****** GX 


****** GX 


SSV2 = 


000002 G 


$SRCPT= 


****** GX 


000006R 


$CFIPT» 


****** GX 


« 


000001 


000067 


KHIPTs 


****** GX 


SSSARG- 


000003 


000012 


SEDMSG' 


****** GX 


ISWST= 


000014 


000006 


SERMSG 


000036RG 


•CLOSE' 


****** G 


000002 


SEXSTSs 


****** GX 


.GC«L2= 


****** r 



VIRTUAL MEMORY USED: 1971 WORDS ( 8 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:16 

C40.20]ERSLP,C40.303ERSLP/-SP«C40,103MACFL.ERSLP 
.OM 



•••* M S •••• 




•••• 



•**• 



6ETLN l«IACRO M1108 U-OEC-77 10:46 PAGE 2 



39 

40 000000 
41 

42 000000 
3? 




000012' 
056 



Oil 



.TITLE GETLN 
.lOENT /05/ 



COPYRIGHT 1974. DIGITAL EQUIPKNT CORP.. I<MVNARD, MASS. 
'OPyRIGMT 1975, DIGITAL EQUIPH6MT CORP.. NAVHARD. MASS. 

fHIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE 
ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION 
OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM. EXCEPT 
AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC. 

THE INFORMATION IN THIS DOCUMENT iS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONST»UEO AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE ON RELIABILITY 
OF ITS SOFTWARE ON tQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION 05 

D.N. CUTLER 15-OCT-72 

MODIFICATIONS: 

C. MONIA 17-SEP-75 

CM001 — ADD ENHANCED LINE LOCATION. USER AUDIT TRAILS 

GET LINE FROM INPUT FILE 
EQUATED SYMBOLS 



LOCAL DATA 



; CM001 



CM001 



.PSECT ULNBO.D 



SLNDES::.BLKW 
.WORD 

tLINHD::.BLKW 
.BYTE 

tLNBUF ; : .BLUB 



1 

ILNBUF 

2 

•..11 



NUMOER OF CHARACTERS IN LINE 
ADDRESS OF LINE 
LINE HEADER 



CM001 



.PSECT 



I* 



••-IGETLN-GET LINE FROM INPUT FILE 

IHtS ROUTINE IS CALLED TO MOVE A RECORD FROM AN INPUT FILE RECORD BUF- 
FER TO ILNBUF. AS THE RECORD IS MOVED. HORIZONAL FORMATING IS CALCULATED. 
ALL CHARACTERS CAUSING HORIZONAL FORMATING TO EXCEED THE RIGHT MARGIN ARE 
IGNORED. 



#••• I 4 •«•• 



GETLN MACRO Ml 108 U 


-OEC-77 10:46 PAGE 2-1 








n 






INPUTS: 






s 








R0=ADDRESS OF BYTE COUNT 


.BUFFER ADDRESS DOUBLEWORD. 


62 
63 
6A 






OUTPUTS: 












RO'ADDRESS OF SENTINEL BYTE IN SLNBUF. I 










R1=H0RIZ0NAL POSITION OF 


NEXT CHARACTER. 


$ 






!• 


SLNDES 


CONTAINS BYTE COUNT OF RECORD IN SLNBUF. 


69 000000 




SGETLN: 


:SAVRG 




■SAVE NONVOLITILE REGISTERS 


70 OOOOOA 


012003 






MOV 


(R0}t,R3 


GET BYTE COUNT 


71 000006 


011002 






MOV 


(RO) .R2 


•GET ADDRESS OF RECORD BUFFER 


72 000010 


005001 






CLR 


R1 


•CLEAR HORIZONAL POSITION 


73 000012 


012700 


000012' 




MOV 


niNBUF.RO 


•GET ADDRESS OF LINE BUFFER 


74 000016 


005303 


' 


Ill 


DEC 


R3 


ANY MORE IN LINE? 


75 000020 


002424 






BLT 


4S 


■IF LT NO 


76 000022 


112205 






MOVB 


(R2)*.R5 
#11. R5 


GET NEXT BYTE IN LINE 


77 000024 


122705 


000011 




CMPe 


HORIZONAL TAB? 


78 000030 


001012 






BNE 


2S 


IF NE NO 


79 000032 


010104 






MOV 


R1.R4 


r<ET CURRENT HORIZONAL POSITION 


80 000034 


042704 


000007 




BIC 


#7-R4 
#10. R4 


CLEAR LOW BITS 


81 000040 


062704 


000010 




ADD 


CALCULATE NEXT TAB STOP 


82 000044 


020427 


0000016 




CMP 


R4,#LSL6TH«1 


ANY HORIZONAL ROOM LEFT? 


83 OOOOSO 


002362 






B6E 


IS 


IF GE NO 


84 000052 


010401 






MOV 


R4.R1 


SET NEW HORIZONAL POSITION 


85 000054 


000404 






BR 


3$ 




86 000056 


020127 


OOOOOOC III 


CMP 


R1.#L$L6TH 


ANY HORIZONAL ROOM LEFT? 


87 000062 


002355 






BGE 


1$ 


IF GE NO 


88 000064 


005201 






INC 


R1 


INCREMENT HORIZONAL POSITION 


89 000066 


110520 


At 


MOVB 


R5.(R0)* 


STORE BYTE IN LINE BUFFER 


90 000070 


000752 






BR 


1$ 


GO AGAIN 


91 000072 


105010 


Ml 


CLRB 


(RO) 


SET SENTINEL BYTE 


92 000074 

93 0C0076 


010002 






MOV 


R0.R2 


COPY ADDRESS OF SENTINEL BYTE 


162702 


000012* 




SUB 


#SLNBUF.R2 


CALCULATE LENGTH OF LINE 


94 000102 


010267 


000000' 




MOV 


R2. SLNDES 


SET LENGTH OF LIN!: IN BYTES 


95 000106 

96 

97 




rii 


RE ruRN 


i 




000001 






.END 







ttft* c 6 **** 



GETLN MACRO M1108 U-DEC-77 10:46 PAGE 2-2 
SYMBOL TABLE 

LtLGTH= ****** GX SLINHD 000004RG 002 SLNBUF 000012RG 002 SLNDES OOOOOORG 002 SSAVRG= ****** GX 
SGETLN OOOOOORG 

. ABS. 000000 000 

000110 001 

tSLNBO 000016 002 

ERRORS DETECTED: 

VIRTUAL MEMORY USED: 381 WORDS ( 2 PAGES) 
DYNAMIC MEMORY: 157A4 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:05 
CA0.20]GETLN,C40.30]GETLN/-SP=CA0.10]MACFL.GETLN 



*••* p 4 *••• 




•••• E 6 •*•• 



I a«Ai K MArKM M««ftk «i_K»r_W 4/\. 



A.± BAee 9 



GTSLP MACRO MHOB U-OEC-77 10:A6 PAGE 2 



1 
2 
3 

A 

5 

6 

7 

8 

9 
10 
11 
12 
13 
U 
15 
16 
17 
18 
19 
20 
21 
22 
23 
2A 
25 
26 
27 
28 
29 
30 

33 

34 
35 
36 

37 
38 

39 

AO 

A1 000000 

A2 

A3 

AA 

A5 

A6 

A7 

A8 

A9 

50 

\y 



\i 
55 
56 
57 



015 



012 



.TITLE GTSLP 
. I DENT /05/ 



COPYRIGHT 197A, DIGITAL EQUIPMENT CORP., MAYNARD, MASS. 
COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD. MASS. 

THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE 
ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION 
OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT 
AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC. 

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 



; CM001 



DEC ASSUMES NO RESPONSIBILITY FOR THE 
OF ITS SOFTWARE ON EQUIPMENT WHICH IS 



USE OR RELIABILITY 
NOT SUPPLIED BY DEC. 



VERSION 05 

D.N. CUTLER 26-JAN-73 

MODIFICATIONS: 

C. MONIA 11-SEP-75 

CM001 — ADD USER-SPECIFIED AUDIT TRAIL 
GET COMMAND INPUT LINE 
MACRO LIBRARY CALLS 

.MCALL GCMLt 



; CM001 



LOCAL DATA 



NOPMT: 



.BYTE 
.EVEN 



15,12 



;N0 PROMPT STRING 



•♦-I6TCML-6ET COMMAND INPUT LINE 

THIS ROUTINE CALLS THE SYSTEM LIBRARY ROUTINE .GCML TO READ THE NEXT 
RECORD FROM THE COMMAND INPUT FILE. IF SPECIFIED, ";»*NEW»»" IS AP- 
PENDED TO THE LINE IMMEDIATELY AFTER THE SELECTED RIGHT MARGIN (I.E. 
73-80 FOR 7Z RIGHT MARGIN). 

INPUTS: 

NONE. 

OUTPUTS: 



•••• f (t •«•• 



MA,-hn 1*4 4 AA 



«i^-Ker'-9V M\,Lt. B&<te 3_1 



$GTCML: 



GTSLP MACRO Ml 108 U-OEC-77 10:46 PAGE 2-1 



58 
59 
60 
61 
62 
63 
64 

65 000002 

66 000006 

67 000010 

68 000012 

69 000020 

70 000024 

71 000026 

72 000032 

73 000036 

74 000044 

75 000060 

76 000062 
11 000066 

78 000072 

79 000076 

80 000104 

81 000106 

82 000112 

83 000116 

84 000120 

85 000122 

86 000126 

87 000132 



C=1 IF END OF FILE OR ERROR ON RECORD READ. 
C-0 IF REQUEST IS SUCESSFUL. 

SAUBEG = ADDRESS OF FIRST BVTE IN AUDIT TRAIL 



016700 OOOOOOG 

005001 

005002 

152760 000001 000141 

005767 OOOOOOG 

001407 

012701 000000' 

012702 000002 
142760 000001 000141 

103425 

062700 000146 

010067 OOOOOOG 

032767 OOOOOOG OOOOOOG 

001012 

012701 OOOOOOG 

112120 

001376 

162700 000001 G 

010067 OOOOOOG 



10$: 



20S: 



30t: 



:MOV 
CLR 
CLR 
BISB 
TST 
BEQ 
MOV 
MOV 
BICB 
GCMLt 
BCS 
ADD 
CALL 
MOV 
BIT 
8NE 
CALL 
MOV 
MOVB 
BNE 
SUB 
MOV 
RETURN 



93 000134 

94 000140 

95 000144 

96 000146 

97 000150 

98 000152 

99 000156 

100 00Q16Q 

101 000162 

102 000164 



103 000170 

104 000172 

105 000174 

106 000176 




|10 

112 ddd|i6 

115 000220 
114 000222 



116002 
122702 
001433 
012701 

OOOG 
122702 
001421 
012701 

OOOG 
122702 
001414 
012701 

OOOG 

001402 
012701 

OOOG 
010002 



000140 
177766 



OOOG 

Mini 



OOOG 
177776 



OOOG 
177775 



OOOG 
1 77774 



OOOG 



EOF OR ERROR 



GTCML1: MOVB 
CMPB 
BEQ 
MOV 
.BYTE 
CMPB 
BEQ 
MOV 
.BVTE 
CMPB 
BEQ 
MOV 
.BYTE 
CMPB 
BEQ 
MOV 
.BYTE 
CMPB 
BEQ 
MOV 
.BYTE 

10S: MOV 



SCMIPT.RO 

R1 

R2 

*GE.C0M,G.M00E 

SCMFLG 

10S 

HfNOPMT.RI 

#2,R2 

/TGE.COM.G.MODE 

R0,R1,R2 

GTCMLl 

»G.CMLD.RO 

SGETLN 

RO, SAUBEG 

«APSND.SSWTCH 

30S 

IPAOLN 

#SNEW,R1 

(R1)«,(R0)« 

20S 

«lLNBUFt1.R0 

RO.SLNDES 



;GET COMMAND BLOCK ADDRESS 
; ASSUME PROMPTING IS REQUIRED 

(R&) .'DISCARD COMMENT LINES 
.•PROMPT? 
.IF EQ YES 
.-SET FOR NO PROMPT 

(R6):LET comment lines COME THROUGH 
;GET A COWAND LINE 
;IF CS EOF OR ERROR 
.•POINT TO LINE DESCRIPTOR 
.•MOVE COMMAND LINE TO LINE BUFFER 
.•STORE AUDIT TRAIL ADDRESS 
.•APPEND ".•••NEy**"? 
•IF NE NO 

:PAD LINE TO RIGHT MARGIN 
;GET ADDRESS OF SUFFIX STRING 
;MOVE STRING TO LINE BUFFER 
;IF NE MOVE ANOTHER BYTE 
.•CALCULATE LENGTH OF LINE 
.-SET LENGTH OF LINE IN BYTES 



; CM001 
; CM001 



G.ERR(R0).R2 

#GE.E0F.R2 

GTCML2 

(PC)»,R1 

E$R5.SSV0 

«GE.10R.R2 

10S 

{PC)»,R1 

EtR6,StV2 

iVGE.0PR.R2 

(PC)»,R1 

EtR7,SSV2 

»GE.B1F.R2 

10$ 

(PC)»,R1 

EtR8.StV2 

"".MDf.R2 



% 



(PO^RI 

EIR4.StV2 

R0.R2 



.'GET ERROR CODE 

;EOF? 

.IF EQ YES 

.•ASSUME I/O ERROR 

.DIAGNOSTIC 

.1/0 ERROR? 

.'IF EQ YES 

.'ASSUME OPEN FAILURE 

.'FATAL -NO RETURN 

;OPEN FAILURE? 

;IF EQ YES 

.'ASSUME BAD FILENAME 

.-FATAL -NO RETURN 

;BAD FILENAME? 

;IF EQ YES 

.ASSUME MAX DEPTH EXCEEDED 

:FATAL-NO RETURN 

.'MAX DEPTH EXCEEDED? 

;IF EQ YES 

ILLEGAL ERROR CODE 

'FATAL -NO RETURN 

icOPY ADDRESS Or GET LINE COMMAND BLOCK 



*••• G 6 •••• 



r.tti D MAfan miMi \L~t\<tt~J1 ^t\'L^^ PAcr ?»? 



GTSLP MACRO MHOS U-DEC-77 10: A6 PAGE 2-2 



115 00022A 

116 000230 

117 00023A 

118 000236 
119 

120 



062702 000U6 
000261 



000001 



ADD 
CALL 
GTCML2: SEC 

RETURN 

.END 



#G.CMLD.R2 
SERMSG 



POINT TO LINE DESCRIPTOR 
OUTPUT ERROR MESSAGE 
SET CARRY 



•*•• H 6 **** 



GTSLP MACHO M1108 U-DtC-77 10!<.6 PAGF 2-5 



GTSLP MACRO MHOS 
SYMBOL TABLE 



U-DEC-77 10:A6 PAGE 2-3 



APtND = 
EMA - 
EtR5 ' 
EM6 - 
E«7 = 
ESft8 =: 
GE.BiF: 
GE.CLOs 
GE.COM* 
GE.CQN= 
GE.EOF= 



♦•••** GX 
****** GX 
****** GX 
****** GX 
****** GX 
****** GX 
177775 
OOOOOA 
000001 
000020 
177766 



GE.IND= 

GE.IOR= 

GE.LC = 

GE.MOE- 

GE.0PR= 

GE.RBG- 

GE.SIZ= 

6TCML1 

GTCML2 

G.CMLD= 

G.OPRM= 



000002 
000010 

\mn 

177776 

177730 

OOOOAO 

0001 3AR 

00023AR 

0001 A6 

000160 



G.ERR = 

G.ISI2: 

G.MODE= 

G.PSDS= 

G.SIZE: 

NOPMT 

PARS$S« 

SSVO : 

SSV2 •• 
S.FDB ■- 



OOOUO 
000020 
0001 A 1 
0001 A2 
00022A 
OOOOOOR 
000000 
♦♦**•* GX 
****** GX 
0001 AO 



S.FNAM- 
S.FNB = 
S.FNBW= 
S.FNTY= 
S.FTYP= 
S.NFEN= 
SAU6EG= 
tCMFLGs 
SCMIPT= 
SERMSG- 



000006 
000036 
000017 
OOOOOA 
000002 
000020 
****** GX 
****** GX 
****** GX 
****** GX 



SGETLN- 

SGTCML 

$LNBUF= 

SLNDES^ 

SNEW = 

$PADLN« 

SSUTCH- 

%% 

.GCML1= 

. . . rpc= 



****** GX 

000002RG 

****** GX 
****** GX 
****** 

****** 
****** 

000001 

****** 

OOOUO 



GX 
GX 
GX 



. ABS. 000000 000 
0002AO 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 2053 WORDS ( 9 PAGES) 
DYNAMIC MEMORY: 157AA WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:16 
CA0.20]GTSLP.CA0.30]GTSLP/-SP«CAO,10]MACFL, GTSLP 



•••* I 6 **•* 



11 L 




•••• J 6 ••*• 



incip MArnn Mnoii u-nrr-r? 10:46 pagf i 



lOSLP MACRO Ml 108 U-DEC-77 10:46 PAGE 2 






if 



000006 
000013 
000021 



.TITLE lOSLP 
.IDENT /05/ 



;«*NEW»* 



COPYRIGHT (C) 1975,1976,1977 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A 
SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE 
INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE, OR 
ANY OTHER COPIES THEREOF, MAY NOT BE PROVIDED OR OTHERWISE 
MADE AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH 
SYSTEM AND TO ONE WIK) AGREES TO THESE LICENSE TERMS. TITLE 
TO AND OWNERSHIP OF THE SOFTWARE SMALL AT ALL TIMES REMAIN 
IN DEC. 

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USfc' OR RELIABUITY OF 
ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION 05 

D.N. CUTLER 26-JAN-73 

MODIFICATIONS: 

C. MONIA 11-SEP-75 

CM001 — ADD USER-SPECIFIED AUDIT TRAIL 

C. MONIA 17-JAN-77 

CM003 — ADD /CM SWITCH. INCREASE INDIRECT FIIE DEPTH 

MONITOR DEPENDENT I/O DATA BASE 

EQUATED SYMBOLS 



FIDEVL»«6. 

FfDIRL=«11. 

F$FILL"17. 



MACRO LIBRARY CALLS 



:MAX LENGTH OF DFVICE NAME 
.-MAX LENGTH OF DIRECTORY NAME 
;MAX LENGTH OF FILENAME 



.MCALL CSltND,CSItSV.CSltSW,rDATtA,FDOP$A 
.MCALL FDRCSA.FSRSZt.GCMLBS.NMBLKt 



LOCAL MACROS 

CLOSE SWITCH P-SECTION 



••«* K A #«•• 



lO^LP MACRO Ml 101 U-DFC-77 10:46 PAGE 2'\ 



I 



lOSLP MACRO mi 08 U-OEC-77 10:A6 PAGE 2-1 



n 

60 
61 
62 
63 
6A 
65 
66 
67 
68 
69 
70 
71 



80 
)1 



90 
91 

94 
95 



9 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 

lis 

1U 



A^FIRST THREE CHARACTER OF BLOCK NAME. 



.MACRO CLOSCT A 

.PSECT A'SyT,D.GBL 

CSISNO 

.PSECT 

.ENDM 



GENERATE CONTROL BLOCK 

GENBLK A.8,C,DD,E.F.G.H.I.J.K 

WHERE: 

A«FIRST THREE CHARACTERS OF BLOCK NAME. 
BrRECORD TYPE. 

c«record attributes, 
od-record size, 
e'record access, 
f-record buffer size. 
C'LOGical unit. 
h«file pointer switch. 
i«default file type, 
j'default device name. 
k-pefault device unit. 





.MACRO 


GENBLK A.B.C.DO.E.F.G.H.I.J.K 




.PSECT 


A'PT.D.GBL 


$»A'PT: 


:.W0RD 


A'PT 


A'PT: 


FDBDFS 






FDATU 


B.C.DI) 


SS>0 








.IF NB 


F 




.PSECT 


A'BUF.D.GBL 


II-. 








.BLKB 


F 




.PSECT 


A'PT.D.GBL 




.ENDC 






FDRCSA 


E.M.F 




.PSECT 


a'nam.d.gbl 


II*. 








NMBLKt 


.l..J,K 


tlO'O 








.IF NB 


H 




.PSECT 


A'DV.D.GBL 


II1>. 








.BLKB 


FIDEVL 




.PSECT 


A'DR.D.GBL 


t%if. 








.BLKB 


FtDIRL 




.PSECT 


A'FL.D.GBL 


113- . 








.BLKB 


FIFILL 



*•#• I 6 **** 



tnti D MAron minft u.hfr-77 iq-aa pagf P«P 



lOSLP MACRO mi08 U-DEC-77 10:A6 PAGE 2-2 



115 
116 
117 
118 
119 
120 
121 
122 
125 
124 
125 
126 
127 
128 
129 
130 
131 
132 
133 
13A 
135 
136 
137 
138 
139 
UO 
HI 

U3 
UA 
U5 
U6 

148 
1A9 
150 
151 
152 
153 
154 
155 
156 
157 
158 
159 

IS? 
Ill 

164 
165 

15? 



.PSECT 


A'FP.O.GBL 


MO''. 




.BLKW 


1 


.WORD 


SSI 


.BLiCW 


1 


.yORD 


$$2 


.BLKW 


1 


.WORD 


S$3 


.ENDC 




.PSECT 


A'PT-D.GBL 
G,$tO,S» 


FDOPtA 


RSNA«E--'=.-A'PT 




.WORD 


A'PTtF.FNB*N.FNAM 


R$SWTH»«.-A'PT 




.BLKW 


1 


RSSWBKbs.-A'PT 




WORD 


A'SW 


.PSECT 


A'SWT,D,G6L 


A'SW: 




.PSECT 




.ENDM 





; GENERATE SWITCH CONTROL BLOCK 

; GENSWT A,B,C,D,E.F.G 

; A»FIRST THREE CHARACTERS OF HtCORC BLOCK NAME. 

; B«A 2 CHARACTER SWITCH NAME. 

1 C'SWITCH MASK. 

t DD-AODRESS OF SWITCH WORD. 

i E>SWITCH MASK DISPOSITION. 

I F=NEGATE ENABLE. 

I G>SWITCH VALUE FLAG 

I 

.MACRO GENSWT A.B.C.DD.E.F .0 

.PSECT A'SWT.D.GBL 

.IF NB G 

CSISSW B.CDD.E.F.B'SVT 

.IFF 

CSItSW B.C.DD.E.F 

.ENDC 

.PSECT 

.ENDM 



GENERATE SWITCH VALUE TABLE 

GENSVr A.B.C.DD 

A»SWITCH TYPE 

B>LOCATION TO RECEIVE SWITCH VAIUF 
C»lfNGTH OF SWITCH VALUE IN BYTES 
DD>0PT10NAl TWO-CHARACTER SWITCH NAME 



•**• M A ttt* 



lOSLP MACRO M1108 14-DtC-77 10:46 PACF 2-5 



lOSLP MACRO Ml 108 U-DEC-77 10:A6 PAGE 2-3 



172 
173 
17A 
175 
176 
177 
178 
179 
180 
181 
182 
183 
18A 
185 

186 000000 

187 000000 000002' 

188 000002 
189 

190 
191 
192 
193 
19A OOOA ' 

195 000000 

196 000000 
197 

198 

199 

200 

201 

202 000000 

203 

204 

205 

206 

207 

208 000000 

209 000000 

210 000000 

211 000000 

212 000000 

213 000000 
2}^ 000000 
215 000000 
216 

217 
218 
?1V 
220 

221 000000 

222 000004 

223 000010 

i 

228 



DO'SVT=. 



.-2 



.MACMO 6ENSVT A.B.C.DD 

.IF ^e DD 

.P'iECT OD'SVT.D.GBL 

,ENDC 

CSItSV A.B.C 

CSItND 

.ENDM 



; GET COMMAND INPUT CONTROL BLOCK 

; 

.PSECT CMIPT.D.GBL 
$CMIPT::.yORD CMIPT ; POINTER TO CONTROL BLOCK 

CMIPT: 6CMLB» 3.SLP 



; FILE CONTROL BLOCKS 

; 



; CM003 
;*.-1 



GENBLK CFI.,.,4,88..3.1,.SV 
GENBLK LST,2.2.9A....A,1,LST,SY 
GENBLK SRC.2.2.88.,,,5,1.,SY 



ALLOCATE FILE SERVICES STORAGE REGION 



FSRSZS A.<4»512.»90.> 



SWITCH CONTROL BLOCK DEFINITIONS 



GENSWT 
GENSWT 
GENSWT 
GENSWT 
GENSWT 
GENSWT 
GENSWT 
GENSWT 



CFI.AU 
CFI.BF 
CFI.CM 
LST.DB 
LST.SP 
SRC.AU 
SRCBF 
SRC, CM 



,APSND 
,BLSNK 
.CMSPR 
.DBSLL 
.SPIOL 
.APINO 
.BLSNK 
.CMWR 



.tSWTCH. 
.tSWTCH, 
.ISWTCM, 
-»SWTrM. 
,tS» I cH, 
.ISWTCH. 
.SSWTCH. 
,»SWTCM. 



CLEAR. NE6.1 
CLEAR. NEG 
SET.NEG.I 
SET. NEG 
CLEAR. NEG 
CLEAR. NEG.1 
CLEAR. NEG 
SET.NfG.1 



; CM003 



; CM005 



SWITCH VALUE TABLES 



6ENSVT NUMERIC. fPDSIZ.P.AU 
GENSVT NUMERIC.IAUIGH.2 
GENSVT NUMERIC, »CMIGM, 2. (M 



CLOSE SWITCH P-SECTIONS 



; CM003 



•••• M 6 **** 



lOSLP MACRO mi08 U-OEC-77 10:«6 PAGE 2-* 



229 

230 000004 CLOSCT CFI 

231 000000 CLOSCT LST 

232 000000 CLOSCT SRC 
233 

23A 000001 .END 



•*•• I f •«•« 



lOSLP MACRO m 108 U-DEC-77 10:A6 PAGE 2-5 
















SYMBOL TABLE 




















AP$NO = •••♦*♦ GX 




F.BKVBr 000064 


F.RCm= 


000034 


G.ERR = 


000140 


S.FDB = 


nnnun 




AUSVT = OOOOOOR 


032 F.CHR = 000075 


F.RCTL= 


000017 


G.IS12= 


000020 


S.FNAMs OOOOOA 




BLSNK = •♦••♦* GX 




F.CNTG= 000034 


F,RS1Z= 


000002 


G.LPDLs 


000100 


S.FNB = 


000036 




CFIPT 000002R 


003 F.DFNB= 000046 


F.RTYP= 


000000 


6.n0DE= 


000141 


S.FNBW- 


000017 




CFISW OOOOOOR 


012 F.DSPT- 000044 


r.SEQN= 


000100 


G.PSDS= 


000142 


S.FNTVs 


000004 




CHRSS » 000115 




F.DVN«= 000134 


F.SPDV= 


000072 


G.SIZE:: 


000224 


S.FTYP* 


000002 




CMIPT 000002R 


002 F.EFBK= 000010 


F.SPUN= 


000074 


LSTPT 


000002R 


013 S.NFEN= 


000020 




CMSVT = OOOOOOR 


033 F.EFN = 000050 


F.STBK= 


000036 


LSTSW 


OOOOOOR 


021 SAULGH:: 


****** GX 




CNtPR = *♦♦*•• 6X 




F.EOBBr 000032 


F.UNIT= 


000136 


N.DID ' 


000024 


SCFIPT 


OOOOOORG 


003 


CNTtS > 000002 




F.ERR = 000052 


F.URBD- 


000020 


N.DVNMr 


000032 


SCMIPT 


OOOOOORG 


wv 

002 


OeSLL = ••♦♦•• GX 




F.FACCs 000043 


F.VBN = 


000064 


N.FID = 


000000 


SCML6H: 


****** QX 




FO.CCLs ♦*•••* GX 




F.FFBYr 000014 


F.VBSZ= 


000060 


N.FNAM« 


000006 


SLSTPT 


OOOOOORG 


013 


FD.RECs *•*♦*♦ GX 




F.FNA|i|= 000110 


GE.BIFr 


177775 


N.FTYPs 


000014 


SPDSIZ= 


****** GX 


V I J 


FO.TTVs ••••♦♦ GX 




F.FNB = 000102 


GE.CLO> 


000004 


N.FVER= 


000016 


SSRCPT 


OOOOOORG 


022 


FSOEVL« 000006 G 




F.FTYP= 000116 


GE.COMb 


000001 


N.NEXT= 


000022 


tSWTCH= 


****** GX 




F$OIRL« 000013 6 




F.FVERs 000120 


6E.C0N* 


000020 


N.STATs 


000020 


$S s 


000001 




F»F1LL« 000021 G 




F.HIBKs 000004 


ge.eof« 


177766 


N.UNIT> 


000034 


sss 


WWW 1 

0001 62R 


002 


F.ACTL» 000076 




F.LUN « 000042 


GE.INDr 


000002 


RSNAME> 


000140 G 


SSO >: 


OOOOOOR 


Wb 

027 


F.ALOC« OOOOAO 




F.WCTs 000054 


GE.IORs 


y77777 


RSSyBK> 


000144 G 


SSI 


OOOOOOR 


024 


F.BBFS* 000062 




F.«C1= 000055 


GE.LC s 


000010 


RSSWTH« 


000142 6 


SS2 


OOOOOOR 


025 


F.BOB = 000070 




F.MBFGr 000056 


GE.WE- 


}r777t> 


SlZtS ' 


000002 


SS3 - 


OOOOOOR 


026 


F.BGBC« 000057 




F.NRBD* 000024 


6E.0PR« 


)77776 


SPSOL * 


****** 6X 


.FSRCBs 


****** G 


VfcW 


F.BKDN> 000026 




F.NREC> 000030 


GE.RBG' 


177730 


SRCPT 


000002R 


022 ...PC1= 


000002R 


022 


F.BKDSs 000020 




F.OVBS= 000030 


GE.S1Z= 


000040 


SRCSW 


OOOOOOR 


030 ...PC2e 


0001 42R 


022 


F.BKEF> 000050 




F.RACC= 000016 


G.C«LO» 


000146 


S.bFHDs 


000020 


...PC3= 


000002R 


022 


F.BKPU 000051 
F.BKST> 000024 




F.RATT« 000001 


G.DPRM* 


000160 


S.FATTs 


000016 


...TPC= 


000020 


Vkfc 


. ABS. 000000 


000 


















000000 


001 


















CMIPT 000452 


002 


















CFIPT 000150 


003 


















CFIBUF 000130 


004 


















CFINAM 000036 


005 


















CFIDV 000006 


006 


















CFIOR 000013 


007 


















CFIFL 000021 


010 


















CFIFP OOOCU 


on 


















CFISWT 000032 


012 


















LSTPT 000150 


013 


















LSTNAM 0OCO36 


014 


















LSTDV 000006 


015 


















LSTDR 000013 


016 


















LSTFL 000021 


017 


















LSTFP OOOOU 


020 


















LSTSWT 000022 


021 


















SRCPT 000150 


022 
025 


















SRCNAM 000CJ6 


















SRCDV 00000< 


024 
025 


















SRCOR 00001] 


















SRCFL 000021 


026 


















SRCFP OOOOU 


027 


















SRCSWT 000032 


030 


















If F SRI 004232 


031 


















AUSVT 000012 


032 
033 


















CMSVT 000006 


















ERRORS DETECTED: 






















t*** c 7 •••• 



lOSLP MACRO Mn08 U-DEC-77 10:46 PAGE 2-6 
SYMBOL TABLE 



VIRTUAL MEMORY UfEO: A772 WORDS ( 19 PAGES) 
DYNAMIC MEMORY: 157A4 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:A5 

W0.20]IOSLP,CA0.30DIOSLP/-SP=CAO,10]MACFL.IOSLP 
N" 



•••• D f •••« 




•••t E f •••• 



rrr 



OPNFL MACRO M1108 U-DEC-77 10:47 PAGE 2 



6 

7 



47 000000 

48 000004 

49 000006 

50 000012 



032713 
001412 
016700 



012701 




KO 016700 



OOOOOOG 
OOOOOOG 

OOOG 
OOOOOOG 
OOOOOOG 



.TITLE OPNFL 
.IDENT /04/ 



COPYRIGHT 1974, DIGITAL EOUIPWCNT CORP.. MArNARD. MASS. 
COPVRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE 
ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION 
OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT 
AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC. 

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD fX)T BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY 
OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION 04 

D.N. CUTLER 4-JAN-72 

ROUTINE TO OPEN ALL FILES 

MACRO LIBRARY CALLS 

.MCALL OPENSR.OPENSW.PUTS 

••SOPNFL-OPEN ALL FILES 

THIS ROUTINE IS CALLED TO OPEN ALL TILES THAT WERE SPECIFIED IN THE COM- 
MAND INPUT STRING. 

INPUTS: 

R3«ADDRESS OF SWITCH OPTION WORD. 
OUTPUTS: 

WUNt ■ 



«0PNFL::8IT #CRSFI,{R3) 

BEQ 101 

MOV »CFIPT,RO 

OPENtR RO 

MOV (PC)*,R1 

.BYTE E|R0,SIV2 

BCS 30$ 

101: BIT #LLIST.(R3) 

BEQ m 

MOV ILSTPT.RO 

OPENtW RO 



CORRECTION INPUT FILE SPECIFIED? 

IF EQ NO 

GET CORRECTION FILE RECORD BLOCK 

OPEN CORRECTION INPUT FILE 

ASSUME OPEN FAILURE 

FATAL-NO RETURN 

IF CS VES-FATAL ERROR 

LINE LISTING FILE SPECIFIED? 

IF EQ NO 

GET LINE LISTING FILE RECORD BLOCK 

OPEN LINE LISTING FILE 



•••t f f •••• 



OPNFL MACRO Ml 108 U-DEC-77 10: A7 PAGE 2-1 



58 000056 

59 000060 

60 000062 

61 00006A 

62 0001 OA 

63 000106 

64 000112 

65 000116 

66 000120 

67 000122 

68 000126 

69 000132 

70 000134 

71 OOOUO 

72 000152 

73 0001 5A 

74 000156 

75 000160 

76 000164 

77 000170 
78 

79 



012701 

OOOG 
103436 



OOOG 



103010 

042713 0000006 
016002 OOOOOOG 
012701 

OOOG OOOG 

032713 OOOOOOG 

001416 

016700 OOOOOOG 

103006 
012701 

OOOG OOOG 
016002 OOOOOOG 



000001 





MOV 




.BYTE 




BCS 




PUTS 




see 




BIC 




MOV 




MOV 




.BYTE 




CALL 


20$: 


BIT 




BEQ 




MOV 




OPENSW 




BCC 




MOV 




.BYTE 


30$: 


MOV 




CALL 


40S: 


RETURN 



(PC)+.R1 

ESR1,S$V2 

30$ 

R0,#$F0RM.#1 

20i 

#LL$ST.(R3) 

R$NAME(R0).R2 

(PO^.RI 

E$R10,S$V0 

$ERMS6 

»SR$C0,(R3) 

40$ 

$SRCPT,R0 

RO 

40$ 

(PC)*.R1 

E$R2,S$V2 

R$NAME(R0}.R2 

$ERMSG 



.END 



ASSUME OPEN FAILURE 

FATAL-NO RETURN 

IF rS YES-FATAL ERROR 

OUTPUT INITIAL FORM FEED 

IF CC OKAY 

CLEAR LINE LISTING BIT 

GET ADDRESS OF NAME STRING 

LINE LISTING I/O ERROR 

DIAGNOSTIC 

OUTPUT ERROR MESSAGE 

SOURCE OUTPUT FILE SPECIFIED? 

IF EG NO 

GET SOURCE OUTPUT FILE RECORD BLOCK 

OPEN SOURCE OUTPUT FILE 

IF CC OKAY 

OPEN FAILURE 

FATAL -NC RETURN 

GET ADDRESS OF NAME STRING 

OUTPUT ERROR MESSAGE 



•tt* Q 7 ••** 



MAfkn Ml in* 1i..Mr.77 in<17 DAftt 9.9 



OPNFL MACRO M1108 
SYMBOL TABLE 

CRSFl = **♦•** GX 

E»RO = ♦••••* GX 

E»R1 = •••**• GX 

EM10 = ••*•♦♦ GX 

EW2 = *♦*♦*• GX 

. ABS. 000000 
000172 
ERRORS DETECTED: 



U-DEC-77 10:A7 PAGE 2-2 



FO.RD = •••••• GX 

F0.WRT= **•♦•• GX 

F.FACC= •*•••• GX 

F.NRBD= •••••* GX 

LL»ST = *••«•• GX 



PARtSS= 000000 

RINAME= •••••• GX 

SRfCO = •••••• GX 

SfVO = •••••• GX 

S$V2 = •*••»• GX 



ICFIPTr ••*••• GX 
tERMSG= •♦••** GX 
SFORM = •••*•• GX 
SLSTPT= •••♦•• GX 
SOPNFL OOOOOORG 



$SRCPT= •♦*♦** GX 
SS s 000001 

•OPEN = •♦•♦•* G 

.PUT = •**•*• 6 



000 
001 



VIRTUAL MEMORY USED: 1365 WORDS ( 6 PAGES) 
DYNAMIC MEMORY: 157AA yORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:12 
CA0.20]OPNFL.tAO,50]OPNFL/-SP=t40.10]MACFL. OPNFL 



•••• H 7 •*•• 



u t 




••*• I 7 tftt 



mrtM%* MApbn Mltna ti.-ACr-TT 1Aii.y BAAC 3 



POSIT MACRO mi08 1A-0EC-77 10:47 PAGE 2 



4! 

46 

47 000000 

40 000002 000004' 



U 000004 



.TITLE POSIT 
.IDENT /06/ 



COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., NAVNARD, MASS. 
COPYRIGHT 1975, DIGITAL EQUIPMENT CORP.. MAYNARD. MASS. 

THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE 
ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION 
OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT 
AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC. 

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY 
OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION 06 

D.N. CUTLER 4-JAN-72 

MODIFICATIONS: 

C. MONIA 11-SEP-75 

CM001 



REWRITE ENTIRE MODULE TO ADD IMPROVED LINE 
LOCATING FACILITY AND USER-SPECIFIED AUDIT 
TRAIL. 



POSITION/DELETE LINES IN CORRECTION INPUT FILE 
MACRO LIBRARY CALLS 

.MCALL CALLR.ISTATS, TRANS, STATES 
LOCAL DATA 



COMMAND LINE DESCRIPTOR 



CMLD: .BLKW 1 

.WORD CMLN 



; LENGTH OF LINE 
; ADDRESS OF LINE 



COMMAND LINE BUFFER 
CMLN: .BLKW 4S. t 

; CURRENT SEARCH STRING DESCRIPTOR BEING BUILT 



•••• J 7 •••• 



M4rBn M11A* 11._rkKr-77 M\.L7 DAr.r 9.1 



POSIT MACRO mi08 U-OEC-77 \0-A7 PAGE 2-1 



58 

59 

60 000136 

61 

62 

63 

6A 

65 

66 OOOUO 

67 

68 

69 

70 

71 

72 000U2 

73 

7* 

75 



» 



78 000U4 

79 

80 

81 



» 



84 000H6 

85 

86 

87 



90 000150 

91 

92 

93 

9A 

95 

96 000154 

97 

98 

99 
100 
101 
102 
103 
104 
105 
106 
107 

\^ 

110 
111 

113 
1U 



CURST: .BLKW 1 

'. END OF LINE NUMBER RANGE 



ENDLN: .BLKW 1 i 

; COMMAND LINE ERROR FLAG 

ERROR: .BLKW 1 ; 

ADDRESS OF ROUTINE TO COPY/DELETE NEXT LINE 
NXTLN: .BLKW 1 ; 

PERIOD COUNTER 
PERCT: .BLKW 1 ; 

; SEARCH STRING DESCRIPTOR 1 
SRC1: .BLKW 2 ; 

SEARCH STRING DESCRIPTOR 2 
SRC2: .BLKW 2 l 



; STATE TABLE TO PARSE THE FOLLOWING SYNTAX 

; ' -CLOCATCK.LOCAfEJC.AUDITj 

; WHERE: 

i 

I LnCATE:>DNUMBER/STRING/EXP 

t AUDIT: 'STRING 

I DNUMBER:=0/ 1/2/5/4... 9 

I STRING:«'/'!CHARACTER!V' 

; EXP:=.!»!DNUMBtR 

INITIALIZE STATE TABLE PARAMETERS 



•••* K 7 *«»• 



bnciT MArnn MlinR U.brr-77 10:47 PAGF ?-? 



POSIT MACRO Ml 108 U-DEC-77 10: A7 PAGE 2-2 



15 000160 

16 

17 

18 

19 

20 

21 000160 

22 000160 

23 000160 
2A 000160 

25 000160 

26 000160 
^; 000160 

28 000160 

29 000160 

30 000160 

31 C00160 
32 

33 
34 

37 000160 

38 000160 

39 000160 

40 000160 
A1 000160 

42 000160 

43 000160 

44 000160 
45 

46 
47 
48 
49 

50 000160 

51 000160 

52 000160 

53 000160 

54 000160 

55 000160 

56 000160 

57 000160 

58 000160 
59 

60 
61 
62 
63 

64 C00160 

65 000160 

66 000160 
67 

68 



I STATS PSTAT.PKEY 



PARSE FIELD LOCATION DESCRIPTOR 



STATES 

TRANS 

TRANS 

TRANS 

TRANS 

STATES 

TRANS 

STATES 

TRANS 

TRANS 

TRANS 



FLOO 

<';>.SEXrr 

<'.>.ENDFL1 

SEO?;.SEXIT 

SLAMOA,,SFLDO 

IFIELD 

<',>,FLD1 

<';>,SEXlT,ExrLO 

SEOS.SEXIT.EXFLO 



EXIT ON END OF STRING 

TEST FOR FIELD 1 END CONDITIONS 

EXIT ON NULL LINE 

TRANSIT TO NEXT STATE 

PARSE ONE FIELD 

SET FIELD 1 CONDITIONS 
; FLUSH CURRENT LINE 
; FLUSH CURRENT LINE 



PARSE FIELD 1 LOCATION DESCRIPTOR 



STATES 

TRANS 

TRANS 

STATES 

TRANS 

STATES 

TRANS 

TRANS 



FLD1 

<'.>.AUDIT.EXFLO 

SLAMDA.,SFLD1 

!FIELD 
ENDFL1 
<•,>, AUDIT 
SLAMDA.EXIT 



; FLUSH CURRENT LINE IF NOP 
SET FIELD 1 CONDITIONS 

PROCESS FIELD 1 

TEST FOR AUDIT 
ELSE EXIT 



PARSE AUDIT STRING FIELD 



STATES 


AUDIT 


TRANS 


V.CPAUO.INAUO 


TRANS 


SLAMOA.EXIT 


STATES 


CPAUD 


TRANS 


V.AUOUT.ENBS 


TRANS 


SeOS.SEXlT.ENBS 


TRANS 


SANY. CPAUD. STAUD 


STATES 


AUOUT 


TRANS 


SLAMDA.EXIT 


; CONDITIONAL EXIT FROM PARSER 



Coer AUDIT STRING 

TEST FOR EXIT CONDITIONS 

EXIT ON STRING TERMINATOR 
: EXIT ON END-OF-STRING 
; STORE AUDIT STRING 

TEST FOR PROPER EXIT CONDITIONS 



STATES EXIT 
TRANS <':>.SEXIT 
TRANS SEOS.SEXIT 



PARSE A SINGLE LOCATION FIELD 



EXIT ON SEMICOLON TERMINATOR 
EXIT ON END-OF-STRlNG 



•••• I 7 •«#• 



mina i/..r\tr.77 in.i.7 Oknt ).t 



1 



POSIT MACRO M1108 U- 


172 000160 


173 000160 


17A 000160 


175 000160 


176 000160 


177 


178 


179 


180 


181 


182 000160 


183 000160 


184 000160 


185 000*^ 


186 000. 


187 OOOIt^ 


188 000160 


189 000160 


190 


191 


192 


193 


194 


195 000160 


196 000160 


197 000160 


198 000160 


199 000160 


200 000160 


201 


202 000160 


203 


20A 


205 



U-OEC-77 10:47 PAGE 2-3 



207 
208 
209 
210 
211 
212 
213 

215 
216 
217 
218 
219 
220 
221 
22? 
223 
224 
225 
226 
227 
22B 



STATES 

TRANS 

TRANS 

TRANS 

TRANS 


FIELD 

•/.STRING, SETCH ; 
<'.>,EXPR.STCUR ; 
SDNUMB,SEXIT,NUMB 
SLAMDA.SEXIT ; 


; COPY AND LOCATE STRING 


STATES 

TRANS 

TRANS 

TRANS 

TRANS 

STATES 

TRANS 

TRANS 


STRING 

V.STR62,FNDST ; 
<••>, STRING, ELIPS 
SEOS,SEXIT.FNDST ; 
SANV, STRING, JWVCH 
STRG2 

•♦,EXP1,EXFL0 ; 
SLAMOA,SEXIT 


; PROCESS EXPRESSION 


STATES 

TRANS 

TRANS 

TRANS 

STATES 

TRANS 


EXPR 

'♦,EXP1 

SE0S,SEXIT,0PER ; 

SLAm>A,SEXIT,OPER 

EXP1 

SDNUMBR,SEXIT,OPER 



SETUP TO COLLECT A STRING 
MARK CURRENT LOCATION 
; PROCESS LINE NUMBER 
EXIT IF ANYTHING ELSE 



FIND LINE CONTAINING STRING 
; CHECK FOR ELLIPSES 
FIND LINE CONTAINING STRING, EXIT 
; COPY CHARACTER 
COMPUTE LINE OFFSET AND LOCATE 
COMPUTE AN OFFSET, FLUSH CURRENT LINE 
EXIT ON ANYTHING ELSE 



TRANSIT TO NEXT STATE ON ♦ 
PERFORM OPERATION IF EOS 

PERFORM OPERATION IF ANYTHING ELSF 

; OPERATE ON NUMBER 



STATES 



•*-SP0SIT-P0SIT10N/DELETE LINE IN CORRECTION FILE 

THIS ROUTINE IS CALLED TO POSITION OR DELETE LINES FROM THE 
CORRECTION INPUT FILE AND CONDITIONALLY ALTER THE AUDIT STRING 
THAT IS OUTPUT WITH EACH NEW LINE. 

POSITIONING OR DELETION IS PERFORMED IN ACCORDANCE WITH THE 

CONTENTS OF EACH LOCATION FIELD. THIS FIELD IDENTIFIES THE 

LINE TO BE LOCATED OR A RANGE OF LINES TO BE DELETED AS FOLLOWS: 

A) A NUMBCR WITHIN THE FIELD SPECIFIES A LINE NUMBER; 

B) AN EXPRESSION OF THE FORM '.'[♦NNN] SPECIFIES AN OFFSET 
FROM THE CURRENT LINE; 

C) A STRING OF THE FORM VABCD.../' SPECIFIES A 
CHARACTER STRING THAT IS USED TO LOCATE THE NEXT LINE 
TO BE OPERATED UPON. 

INPUTS: 

SLNBUF CONTAINS THE CURRENT COMMAND LINE, SLNDES CONTAINS 
THE BYTE COUNT OF THE LINE. 



•••• M T **** 



M^tT MAfRfl MnOR 14-DEC-77 10:47 PAGE 2-4 



POSIT MACRO M1108 U-DEC-77 10: A7 PAGE 2-U 



229 

230 000160 

231 000160 

232 0001 6A 

233 000170 
23A 000174 

235 000176 

236 000200 

237 000204 

238 000206 

239 000206 
2A0 000210 
2A1 000212 
2A2 0002U 
2A3 000216 
2A4 000222 
2A5 000226 
2A6 000230 
2A7 00023A 
2A8 000236 
2A9 0002A2 
25C 0002AA 

251 000250 

252 00025A 

253 000260 
25A 000260 
255 

256 
257 
258 
259 
260 
261 
262 
263 
26A 000262 

265 000262 

266 000266 

267 000270 
.'68 000272 
:'69 0O027A 
?70 000500 

271 000302 

272 000302 

273 000306 
27A 000312 

275 000316 

276 000522 
27? 0Q033Q 

278 000332 

279 000332 
280 

H 

28A 

285 



00O55A 



105077 
012700 
01000A 
00520A 
012701 
005003 

005203 
112120 
001375 
005303 
012702 
010367 
005303 
012705 
005001 

103006 
012702 
012701 



103A05 

103017 

0007/0 

016700 
016002 
012701 

0A2767 
000261 



OOOOOOG 
OOOOOA* 



OOOOOOG 



000000* 
177552 

000000' 



000000' 

ooooooc 



IPOSIT: 


: 








SAVRG 




SAVE THE NON-VOLATILE REGISTERS 




CLRB 


aSAUBEG 


TRUNCATE AUDIT TRAIL 




MOV 


#CMLN,RO 


■ GET ADDRESS OF COMMAND LINE BUFFER 




MOV 


RO.RA 


• SAVE COMMAND LINE ADDRESS 




I!ic 


RA 


• STEP PAST '-' 




m 


/rSLNBUF.RI 


• GET ADDRESS OF LINE BUFFER 




Cli 


R3 


■ INITIALIZE COUNT 


lOlt 










INC 


R3 


INCREMENT BYTE COUNT 




MOVB 


(R1)»,(R0)* 


■ COPY COMMAND LINE 




BNE 


10S 


IF NE CONTINUE 




DEC 


R3 


■ CORRECT FOR NULL 






#P»CEV,R2 


• GET ADDRESS OF KEYWORD TABLE 




iDy 


R3.CMLD 


• SET BYTE COUNT 




M« 


R3 


• ACCOUNT FOR DELETED CHARACTER (-) 




NOV 


(»PSTAT.R5 


• GET STATETABLE ADDRESS 




CLR 


R1 


■ SURPRESS BLANKS 




CALL 


.TPARS 


• PARSE THE LINE 




KC 


20$ 


• IF C/C OK 




W 


#CMLD,R2 


• GET ADDRESS OF COMMAND LINE DESCRIPTOR 




MOV 


#<S$V1*A00!ESR1A 


>.R1 ; SET ERROR. SEVERITY 




CALL 


tERMSG 


• REPORT SYNTAX ERROR 


tMi 






1 




RETURN 




1 



ACTION SUBROUTINES 

COPY A LINE OF TEXT TO SOURCE AND LISTING FILES 



.ENABL LSa 



COPY: 



OOOOOOG 
OOOOOOG 
OOOOOOC 

OOOOOOG OOOOOOG 



IMi 



SGTCFL 

10» 

a(SP)* 

20$ 

EXFLO 

CO«>Y 

$CflPT,RO 

RSNAME(R0),R2 

#<SIV0*A00!E$R3> 

tERMSG 

fCRSfl.SSWTCH 



Mil 



RE TURN 



READ ONE LINE OF INPUT 
IF C/S EOF OR ERROR 
TEST IF LOCATION CRITERIA SATISFIED 
IF C/C YES, TERMINATE COPY 
WRITE CURRENT LINE TO OUTPUT FILES 
READ NEXT CORRECTION INPUT LINE 
REPORT PREMATURE EOF 
GET CORRECTION FILE BLOCK 
POINI TO NAME STRING 
R1 ; GET ERROR/ SEVERITY 
REPORT ERROR 

CLEAR rORRECIlON INPUT FILE SW'ICH 
SET ERROR CONDITION 



PcLETF A LINE OF CORRECTION FILE TEXT 



DCLETi 



••*• N 7 •••• 



POSIT MACRO Ml 108 U-OEC-77 10:<.7 PA6F 2-5 



286 00033A 

287 OOOMO 

288 0003A2 

289 000M6 

290 000350 

291 000552 

292 00035A 

293 00035A 
29A 

295 
296 
297 
298 
299 
300 

301 000356 

302 000356 

303 000362 

304 000366 

305 000370 

306 000374 

307 000402 

308 000404 
309 

310 
311 
312 
313 

314 000406 

315 000406 

316 000412 
317 

318 
319 
320 
321 
322 

323 000414 

324 r/00414 

325 000420 

326 000424 




005267 
103005 

103755 

000770 



OOOOOOG 



012701 
022711 
001540 
005267 
026727 
002532 



005067 
005767 
001051 

0167^6 
000^61 



5567 

1040 

811% 



30S: 



INC 

BCC 

CALL 

BCS 

CALL 

BR 



SLNDEL 

30$ 

SGTCFL 

10S 

a(SP)« 

DELET 



INCREMENT COUNT OF LINES PELETED 
IF C/C REACHED END OF DELETE RANGE 
COPY OVER CURRENT LINE 
IF C/S ERROR 
CALL THE CALLER 
GO AGAIN 



RETURN 
.DSABL LSe 



RECOGNIZE ELIPSES (...) 



000136* 
000154' 

177552 

177546 000003 



ELIPS: 



MOV 
CMP 
BEQ 
INC 
CMP 
BLT 
RETURN 



#CURST,R1 

«SRC2,(R1) 

M0VC1 

PERCT 

PERCT,#3 

M0VC1 



GET ADDRESS OF CURRENT SEARCH DESCRIPTOR 

SEEN ONE SET OF ELIPSES? 

IF EQ YES 

INCREMENT PERIOD COUNTER 

SEEN THREE IN A RCW? 

IF LT NO 



ENABLE BLANK SURPRESSION 



005067 OOOOOOG 



ENBS: 



CLR .PF LAG 
RETURN 



ENABLE BLANK SURPRESSION 



FIND A LINE WITH MATCHING STRING 



OOOOOOG 

177506 

1 77474 
M5C 



'NOST: 



101: 




012701 000154' 



20t: 
301: 



CLR 

TST 

BNE 

SAVRG 

MOV 

SEC 

CALL 

ADC 

BNE 

MOV 

MOV 

CALL 

INC 

BCC 

BR 

MOV 



.PFLAG 

ERROR 

701 

NXTLN,-(SP) 



i<$P>* 

ERROR 

70t 

fSRCI.RI 
f$LNBUF.R4 
301 
(SP)* 




ALLOy BLANK SURPRESSION 

COMMAND LINE ERROR DETECTED? 

IF NE YES 

SAVE VOLATILE REGISTERS 

SET COPY/DELE T SUBROUTINE ADDRESS 

FORCE READ OF NEXT LINE 

CALL COPV/DELIT ROUTINE 

POSSIBLY SET ERROR CONDITION 

IF NE ERROR 

GET ADDRESS OF SEARCH FIELD 1 

GET LINE BUFFER ADDRESS 

SEARCH FOR STRING 

REMOVE RETURN ADDRESS 

IF C/C SEARCH STRING 1 MATCHED 

GET NEXT LINE 

GET ADDRESS OF STRING 2 DESCRIPTOR 



•tt* t I **•* 



POSIT MACRO M1108 U-OEC-77 10:47 PAGE 2-6 



343 000A76 
3AA 000500 
3A5 000500 
3A6 000502 
3A7 000506 
348 000506 
M9 000510 

350 000512 

351 0005U 

352 000516 

353 000520 

354 000522 

355 000524 

356 000526 

357 000530 

358 000532 

359 000534 

360 000534 

361 000542 

362 000546 

363 000550 

364 000550 
365 

366 
367 
368 
369 
-70 000552 

371 000552 

372 000560 

373 000562 

374 000566 

375 000566 

376 000572 
377 

378 
379 
380 
381 

382 OiX)576 

383 000576 

384 000602 

385 000606 

386 000612 

387 000614 

388 000620 

389 000622 

390 000622 
000624 




010405 

011102 
016103 

005302 
000241 
002410 
105714 
000261 
001747 
122324 
001770 
005205 
010504 
000762 

016767 
005067 



032767 
001002 



00526^ 
016701 
012702 
010122 
012712 
011202 

105022 
005301 
002375 



000002 



40S: 
50S: 



OOOOOOG 177376 
OOOOOOG 



60t: 



70ti 



NOV 

NOV 
MOV 

DEC 

CLC 

BLT 

TSTB 

SEC 

BEQ 

CMPB 

BEQ 

INC 

NOV 

BR 

MOV 
CLR 
CALL 

RETURN 



R4,R5 

(R1),R2 
2(R1),R3 

R2 

60$ 
(R4) 

10S 

(R3)*,(R4)* 

50$ 

R5 

R5,R4 

40$ 

$CFNMB,ENDLN 

.PNUMB 

a(SP)^ 



COPY CURRENT LINE BUFFER POINTER 

GET DESCRIPTOR BYTE COUNT 
GET STRING ADDRESS 

DECREMENT STRING COUNT 

ASSUME MATCH 

IF LT HAVE HATCH 

END OF STRING? 

ASSUME YES 

CALL CALLER 

TEST STRING 

IF EQ POSSIBLE MATCH 

INCREMENT POINTER 

RESET STRING POINTER 

GO AGAIN 

SET END LINE NUMBER 
CLEAR LINE NUMBER 
CALL THE CALLER 



FLUSH CORRECTION FILE INPUT BUFFER AT END OF FIELD 



OOOOOOG OOOOOOG 



EX^LO: 



005067 OOOOOOG 



10$: 



BIT «AP$ND.$SWTCH 

BNE 10$ 

CALL $CMPRS 

CLR $LNDEL 

CALLR $PUTLN 



COMRESS LINE? 

IF NE NO 

COMPRESS CURRENT LINE 

CLEAR COUNT OF SUCCESIVE DELETIONS 
WRITE LINE TO OUTPUT FILES 



/ 



INITIALIZE FOR COLLECTION OF AUDIT STRING 



OOOOOOG 
OOOOOOG 
000150' 

OOOOOOG 



INAUO: 



101: 



INC 

MOV 
MOV 
MOV 
MOV 
MOV 

CLRB 
DEC 
BG£ 
RETURN 



.PF LAG 

$AULGH,R1 

#SRC1.R2 

R1.{R2)* 

«$NEW,(R2) 

(R2),(»2 

(R?)* 
R1 

ia$ 



RESET BLANK SUPREf^SION 

GET LkNGTH OF FIELD 

GET ADDRESS OF STRING DESCRIPTOR 

SAVE MAX STRING SIZb 

SAVE ADDRESS OF AUDIT BUFFER 

SET BUFFER ADDRESS 

C'.EAR AUDIT STRING 

DECREMENT MAX AUDIT TRAIL SIZ£ 

IF GE GO AGAIN 



BUILD CHARACTER STRING FOR SEARCH 
MOVCH: I 



••*• c 8 **** 



POSIT MACRO mi08 U-OEC-77 10:A7 PAGE 2-7 



AOO 000632 
A01 000636 
A02 0006A2 
A03 0006A6 
AOA 000650 
A05 0006SA 

406 000660 

407 000666 

408 000670 

409 000670 

410 000672 
411 

412 
413 
414 
415 

416 000674 

417 000674 

418 000700 

419 000702 

420 000706 

421 000714 

422 000^16 

423 000^20 

424 000724 

425 000726 

426 000730 

427 000730 

428 000732 

429 000734 

430 000742 

431 000744 

432 000744 

433 000746 

434 000750 

435 000750 

436 000752 

437 000756 

438 000762 

439 000766 

440 000770 

441 000770 

442 000774 
443 

444 
445 
446 
447 

448 000776 

449 000776 

450 001004 
451 

452 
455 
454 
455 
456 001006 



012701 
012700 
021027 
103410 
162731 
012741 
016767 
005010 

005231 



005767 
001033 
016746 
026767 
101015 
001004 
021627 
001407 
000410 



103416 
026767 
103772 



000410 

005726 
012702 
012701 

000261 

005567 



066767 
000733 



000136' 
000146' 
000003 

000002 
000154' 
OOOOOOG 177270 



W0VC1: 



NOV 
MOV 
CMP 
BLO 
SUB 
MOV 
MOV 
CLR 

INC 
RETURN 



#CURST.R1 

#PERCT,RO 

(R0),#3 

M0VC1 

«2,a(R1)^ 

#SRC2,-(R1) 

.PSTPT,SRC2*2 

(RO) 

i(R1)t 



FIND SPECIFIED LINE NUMBER 



177242 

177236 

OOOOOOG OOOOOOG 



NUMB: 



000334' 



10$: 



OOOOOOG OOOOOOG 



UOOOOO' 
OOOOOOG 



177146 



20S: 



30t: 



40$: 



TST 
BNE 
MOV 
CMP 

i 

BEQ 

BR 

CALL 
BCS 
CMP 
BLO 

CALL 
BR 

MOV 

CALL 

SEC 

ADC 

RETURN 



ERROR 

40$ 

NXTLN,-(SP) 

$CFNMB/ .PNUMB 

30$ 

10$ 

{SP),*DELET 

20$ 

30$ 

a(SP)* 

40$ 

SCFNMB< • PNUMB 

^0$ 

a(SP)* 

40$ 

(SP)* 
«CMLD,R2 



GET POINTER TO STRING DESCRIPTOR 

GET ADDRESS OF PERIOD COUNTER 

SEEN ELLIPSES? 

IF LO NO 

BACK-UP SEARCH STRING 

SET ADDRESS OF NEW STRING 

SET ADDRESS OF START OF STRING 

RESET PERIOD COUNT 

INCREMENT STRING COUNT 



COMMAND LINE ERROR DETECTED? 

IF NE YES 

PUSH ADDRESS OF LINE PROCESSOR 

LEGAL LINE NUMBER? 

IF HI NO 

IF NE OK 

IN FIELD 1? 

IF EQ YES 

ELSE ERROR 

CALL LINE PROCESSOR 

IF C/S ERROR READING CORRECTION INPUT FILE 

HAVE SPECIFIED LINE? 

IF LO NO 

SET DELETE COUNT 
EXIT 

CLEAN STACK 

GET LINE DESCRIPTOR ADDRFSS 



#<S$v6*400!E$R20>.Rl ; GET ERROR/SEVERITY 



$ERMSG 



ERROR 



OUTPUT ERROR »1ESSAGE 
SET LINE ERRON CONDI TlOf 

UPDATE ERROR STATUS 



177136 OOOOOOG 



COMPUTE NEXT LINE NUMBER AND PROCESS IT 
OPER: 



^ 



ENDLN,. PNUMB 



COMPUTE LINE NUMBER TO BE FOUND 
SEARCH FOR SPECIFIED LINE 



SETUP CHARACTER STRING DESCRIPTORS FOR SEARCH 
SETCH: I 



••*• p 8 **** 



POSIT MACRO H1108 U-DEC-77 10:A7 PAGE 2-8 



A57 001006 
458 001012 
A59 001016 
A60 001022 

461 001026 

462 001030 
A63 001 03A 

464 001036 

465 001040 

466 001042 

467 001044 
468 

469 
470 
471 
472 

473 001046 

474 001046 

475 001052 

476 001060 
477 

478 
479 
480 
481 

482 001062 

483 001062 

484 001970 
485 

486 
487 
488 
489 

490 001072 

491 001072 

492 001076 

493 001100 

494 001102 

495 001104 

496 001110 

497 001112 

498 001112 
499 

500 
501 
502 
503 

504 001 1U 

505 001114 

506 001120 

507 001126 

508 001134 

509 QQ1186 

510 001142 

511 001142 

III 



005267 OOOOOOG 

005067 177150 

012701 000150' 

010167 177110 

005021 

016711 OOOOOOG 

005211 

012102 

005021 

010211 




.PFLAG 

PERCT 

#SRC1 ,R1 

R1, CURST 

(R1) + 

.PSTPT,(R1) 

(R1) 

(R1)*.R2 

(R1)t 

R2,(R1) 



DISABLE BLANK SUPRESSION 

CLEAR PERIOD COUNT 

GET STRING DESCRIPTOR ADDRESS 

SET ADDRESS OF CURRENT STRING 

ZERO COUNT 

SET ADDRESS OF FIRST CHARACTER 

GET ADDRESS OF FIRST CHARACTER 
CLEAR STRING 2 COUNT 
SAVE STRING ADDRFSr, 



SETUP FOR PROCESSING FIELD INPUT 



005067 177070 
012767 000262' 177064 



SFLDO: 



an 

RETURN 



ERROR 
*COPy.NXTLN 



RESET LINE NUMBER ERROR FLAG 
SET FOR COPY LINE OPERATION 



SETUP FOR PROCESSING FIELD 1 INPUT 



012767 0003T4' 177054 



SFLD1: 



MOV #DELET.NXTLN 
RETURN 



SET FOR LINE DELETION OPERATION 



STORE AN AUDIT CHARACTER 



012701 000150' 

005711 

001404 

005321 

116731 0000006 

005241 



STAUD: 



10$: 



i 



MOV 


#SRC1,R1 


w 


(R1) 


m 


10S 


m 


(RD* 


MOVB 


.PCHAR.a(R1)t 


INC 


-(R1) 



RETURN 



GET ADDRESS OF AUDIT STRING DESCRIPTOR 

ROOM FOR MORE? 

IF EQ NO 

DECREMENT AUDIT COUNT 

STORE AUDIT CHARACTER 

POINT TO NEXT OUTPUT BYTE 



; POSITION CORRECTION INPUT FILE TO NEXT l INE 



005067 OOOOOOG 

016767 OOOOOOG r7012 

022767 000334* ir7010 

00U02 

005267 176776 



000001 



STCUR- 



IMi 



.PNUHB 

tCFNMB.ENDLN 

«DELET,NXTLN 

10$ 

ENOLN 



HE TURN 
.END 



CLEAR LINE NUMBER INCREMENT 

SET END LINE NUMBER 

IN DELETE MODE? 

IF EQ YES 

FORCE READ OF NEXT LINE 



•••• I I ttt* 



POSIT MACRO mi08 
SYMBOL TABLE 



U-OEC-77 10:47 PAGE 2-9 



APSND ^ 

AUDIT 

AUOUT 

CMLD 

CMLN 

COPY 

CPAUO 

CRtFI = 

CURST 

DELET 

EL IPS 

ENBS 

ENDFL1 

ENDLN 

ERROR 

EXFLO 

EXIT 



****** GX 

000072R 

0001 26R 

OOOOOOR 

OOOOOAR 

000262R 

0001 OAR 

****** GX 

0001 36R 

00033AR 

000356R 

0OOA06R 

000062R 

0001A0R 

000U2R 

000552R 

0001 52R 



. ABS. 000000 
001 UA 
SSTATE 000260 
SKTAB 000000 
SKSTR 000000 
ERRORS DETECTED: 



EXPR 
002 EXP1 
002 ESR1A 
EtR20 
ESR3 
FIELD 
002 FLDO 
FLD1 
FNDST 
INAUD 
MOVCH 
N0VC1 
NUMB 
NXTLN 
OPER 
PERCT 
002 PKEY 

000 
001 
002 
003 
OOA 



002 



000232R 

000252R 

****** GX 

****** GX 

****** GX 

0001 A2R 

OOOOOOR 

GOOOAAR 

000A1AR 

000576R 

000632R 

000670R 

00067AR 

0001 AAR 

000776R 

0001 A6R 

OOOOOORG 



002 PSTAT 
002 RSNAW= 
SETCH 
SFLDO 
SFLD1 
002 SRC1 
002 SRC2 
002 STAUD 
STCUR 
STRG2 
STRING 
StVO » 
SIV1 = 
tALPHA> 
SANV = 
tAUBEG= 
003 



OOOOOORG 


002 $AULGH= 


****** 


GX 


SPOSIT 


0001 60RG 


****** GX 


SBLANKr 


000306 




$PUTLN= 


****** GX 


001006R 


$CFIPT= 


****** 


GX 


SRAD50= 


000316 


0010A6R 


SCFrjMBs 




GX 


»SAVRG= 


****** GX 


001062R 


$CW»RS= 


****** 


GX 


$STRNG= 


00030A 


0001 50R 


SDIGITs 


00032A 




SSUBXP= 


000310 


0001 5AR 


$DNUPe> 


0003 U 




$SWTCH= 


****** GX 


001072R 


SEOS = 


000312 




ss 


000001 


00111AR 


$ERNSG= 


****** 


GX 


SSSFLGc 


ynin 


000220R 


002 SEXIT r 


000000 




SSSKEVr 


yimi 


0001 70R 


002 »GTCFL= 


****** 


GX 


SSSSTAr 


000000 


****** GX 


SLAMOAs 


000300 




.PCHAfi= 


****** GX 


**•*•«• GX 


tLNBUF= 


****** 


GX 


.PFLAG= 


****** GX 


00032^ 


$LNDEL= 


****** 


GX 


.PNUMB' 


****** GX 


000320 


SNEy r 


****** 


GX 


.PSTPT= 


****** GX 


****** GX 


SNUMBRs 


000302 




. TPARS* 


****** GX 



VIRTUAL NENORV USED: 2208 yORDS ( 9 PAGES) 
DYNAMIC MEMORY: 157AA WORDS ( 60 PAGES) 
ELAPSED TIME: 00:01:07 

CA0.20DPOSIT,CA0.30]POSIT/-SP«CA0,10]MACFL. POSIT 
VgOM 



•*•• f I ••*• 




•••• Q I •••• 



I _. 



PUTLN MACRO ("11108 U-OEC-77 10:48 PAGE 2 



42 000000 

43 000002 

44 000004 

45 000006 

46 000010 



014 
001750 
000144 
000012 
000001 



000 



.TITLE PUTLN 
.lOENT /05/ 



COPYRIGHT 1974. DIGITAL EQUIPMENT CORP.. NAVNARD. MASS. 
COPYRIGHT 1975. DIGITAL EQUIPMENT CORP.. NAYNARO. MASS. 

THIS SOFTVARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE 
ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION 
OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM. EXCEPT 
AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC. 

THE INFORfMTION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY 
OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION 05 

MODIFICATIONS: 

C. MONIA 17-JUL-76 

CM003 — ALLOW LINES PER PAGE TO BE SPECIFIED AT LINK TIME 

D.N. CUTLER 4-JAN-72 

PUT LINE IN SOURCE OUTPUT AND LINE LISTING FILES 

MACRO LIBRARY CALLS 

.MCALL PUTI 

LOCAL DATA 



IFORM: 
DTAB: 



.BYTE 
.WORD 
.WORD 
.WORD 
.WORD 



14.0 


: 


10.»10.O0. 




10.*10. 




10. 


; 


1. 


1 



.•POWERS OF TEN TABLE 



••-IPUTLN-PUT LINE IN SOURCE OUTPUT AND LINE LISTING FILES 

THIS ROUTINE OUTPUTS THE LINE IN tLNBUF TO EITHER/AND THE SOURCE 
OUTPUT AND LINE LISTING FILES. IF AN ERROR IS ENCOUNTERED, THEN 
THE APPROPRIATE OUTPUT FILE FLAG IS CLEARED AND FURTHER PUT LINES 
TO THAT FILE ARE IGNORED. BEFORE THE LINE IS OUTPUT TO THE LiNt 
LISTING FILE. THE CURRENT LINE NUMBER IS CONVERTED TO ASCII AND 
STORED IN ILINHD. THE LINE HEADER AND LINE ARE THEN OUTPUT. 



**t* H I •#•• 



rz 



MArnn MlirvB 



li.-ncr-'yT ^t\,Lm HArc 3_i 



PUTLN MACRO W108 U-OEC-77 10: A8 PAGE 2-1 



S8 

59 
60 
61 
62 
63 
64 
65 
66 

67 000012 

68 000016 

69 000022 

70 000026 

71 000034 

72 000036 

73 000044 

74 000050 

75 000052 

76 000056 

77 000076 

78 000100 

79 000104 

80 000110 

81 000112 

82 000114 

83 000120 

84 000124 

85 000126 

86 000132 

87 000136 

88 000142 

89 000146 

90 000152 

91 000156 

92 000160 

93 000164 

94 000166 

95 000170 

96 000172 

97 000174 

98 000176 

99 000202 

100 000210 

101 000214 

% S8S!:4 

104 000242 

105 000244 

106 000250 



INPUTS: 

LINE IN SLNBUF. 
OUTPUTS: 

LNUMBS IS INCREMENTED. 



SPUTLN: 



012704 OOOOOOG 

005267 OOOOOOG 

122767 000014 OOOOOOG 

001003 

012767 000001 OOOOOOG 

032714 OOOOOOG IS: 

001423 

016700 OOOOOOG 

103010 

042714 OOOOOOG 

016002 OOOOOOG 
012701 

OOOG OOOG 



032714 
001536 
012700 
012710 
012740 
012702 
016701 
020127 
002402 
162701 
020122 
002002 
105720 
000774 
005002 

062767 
005767 
001013 
016700 

103455 
016700 



OOOOOOG 

000002G 

020040 

020040 

000002' 

OOOOOOG 

023420 

023420 



3S: 




4S: 

5S: 

000006 OOOOOOG 
OOOOOOG 

OOOOOOG 

OOOOOOG 6t: 



000014 OOOOOOG 



iH 

114 000320 



OOOOOOG 



:SAVR6 
MOV 
INC 
CMPB 
BNE 
MOV 
BIT 
BEQ 
MOV 
PUTS 
BCC 
BIC 
MOV 
MOV 

.arTE 

CALL 

BIT 

BEQ 

MOV 

MOV 

MOV 

MOV 

MOV 

CMP 

BLT 

SUB 

CMP 

BGE 

TSTB 

W 

CLR 

CALL 

ADD 

TST 

BNE 

MOV 

PUTS 

BCS 

MOV 

PUTS 

BCS 

CMPB 

BEO 

MOV 

BIT 

BEQ 

MOV 

PUTS 



«SSWTCH,R4 

SLNUMB 

«1 4, SLNBUF 

IS 

#1.SLNDES 

«SRSC0,(R4) 

3S 

SSRCPT.RO 



.•SAVE NONVOLITILE REGISTERS 

.-GET ADDRESS OF SWITCH OPTION WORD 

; INCREMENT LINE NUMBER 

.-HRST CHARACTER FORM FEED? 

.IF NE NO 

.•FORCE BYTE COUNT OF 1 

.•SOURCE OUTPUT FILE? 

;IF EQ NO 

.•GET SOURCE OUTPUT FILE RECORD BLOCK 



RO.«SLNBUF.SLNDES:OUTPUT SOURCE RECORD 



3S 

«SRSC0,(R4) 

RSNAME(R0).R2 

(PC)*.R1 

ESR9,SSV0 

SERMSG 

#LLSST.(R4) 

12S 

«SLINHD«2,R0 

r* ,(R0) 

#" ,-(R0) 

«DTAB.R2 

SLNUMB.RI 

R1 .#10000. 

4S 

f 10000.. R1 

R1,(R2)* 

5S 

(R0)« 

4S 

R2 

SCBDMG 

*6,SLNDES 

SPLNMB 

oS 

slstpt.ro 



:IF CC no EOF OR ERROR 

.•CLEAR SOURCE OUTPUT BIT 

:GET ADDRESS OF NAME STRING 

.•SOURCE OUTPUT I/O ERROR 

;DIAGNOSTIC 

.•OUTPUT ERROR MESSAGE 

.•LINE LISTING FILE? 

.IF EO NO 

.GET ADDRESS OF LINE HEADER 

; BLANK LINE HEADER 



.GET ADDRESS OF TENS TABLE 

.GET CURREN1 LINE NUMBER 

;LIN£ TOO BIG? 

.•IF LT NO 

.REDUCE LINE NUMBER BV 10000. 

; COMPARE LINE NUMBER WITH TABLE 

;IF GE FOUND PLACE 

.-ADJUST RO 

;G0 AGAIN 

.•SUPPRESS ZEROS 

.-CONVERT TO DECIMAL 

.-ADD 6 BYTES FOR ilttc HEADER 

;TIMI TO OUTPUT HEADING? 

.'IF NE NO 

;G£T LINE LISTING FILE RECORD BLOCK 
R0.#SHEADG.SHDSIZ;OUTPUT PAGE HEADING 
lOi ;IF CS EOF OR ERROR 

SLSTPT.RO ;GET LINE LISTING FILE RECORD BLOCK 

RO.«SLINHD.SLNOES;OUTPUT LINE WITH LINE NUMBER 
IDS ;IF CS EOF OR ERROR 

f 4, SLNBUF ;LEAOING CHARACTER A FORM FEED? 

1 » . ;1F EQ YES 

'I.RS ; ASSUME SINGLE SPACING 

fD6SLL.(R4) .DOUBLE SPACING? 

§t ;ir EQ NO 

SLSTPT.RO ;GET LINE LISTING FILE RECORD BLOCK 

R0..#0 ;0UTPUT null LINE 



•••• I 8 •••• 



I mtt ^•i k.t — . 



.A*>fcr\ a*< % f\^ 



< A-K*^_^^ %fi. 



aAr.g ^^^ 



PUTLN MACRO MHOS U-DEC-77 10:<8 PAGE 2-2 



115 000330 

116 000332 

117 00033A 

118 000340 

119 0003A6 

120 000350 

121 000354 

122 00037A 

123 000376 
12A 000402 

125 000406 

126 000410 

127 000412 

128 000416 

129 000422 
130 

131 



103422 

005203 

060367 OOOOOOG 8$: 

026727 OOOOOOG OOOOOOG 

002425 

016700 OOOOOOG 



103010 

042714 OOOOOOG 
016002 OOOOOOG 
012701 

OOOG OOOG 

005067 OOOOOOG 



000001 



lot: 



111: 
12$: 



BCS 
INC 
ADD 
Cl*> 
BLT 

nov 

PUT* 

BCC 

BIC 

MOV 

NOV 

.BYTE 

CALL 

CLR 

RETURN 

.END 



10$ 

R3 

R3,SPLNnB 

tPLM«.#PSGLGH 

12t 

»LSTPT.RO 

R0.»$F0Rn.«1 

iii 

«LL$ST,(R4) 

RSNAnE(R0).R2 

(PC)*.R1 

EtRIO.SSVO 

SERMSG 

tPLNMB 



IF CS EOF OR ERROR 
SET FOR DOUBLE SPACING 
UPDATE PAGE LINE NUMBER 
ANY MORE ROOM LEFT ON PAGE? 
IF LT YES 

GET LINE LISTING RECORD BLOCK 
OUTPUT A FORM FEED 
IF CC NO EOF OR ERROR 
CLEAR LINE LISTING BIT 
GET ADDRESS OF NAME STRING 
LINE LISTING I/O ERROR 
DIAGNOSTIC 

OUTPUT ERROR MESSAGE 
CLEAR PAGE LINE NUMBER 



•••• J I *«*« 



MAfan MllfVA 11._n>r-97 lAi^S BArc 3-1 



PUTLN MACRO ni108 
SYMBOL TABLE 

DBSLL = •••'*♦ GX 
DTAB 000002R 
E»R10 = *••«♦* GX 
E»R9 = ♦*•**♦ GX 
F.NRBO= ••♦*•♦ GX 
LL»ST = •**•*« GX 



U-DEC-77 10:48 PAGE 2-3 



PARtS$= 000000 
P$GLGH= *»•♦♦. GX 
R$NAHE= «♦•♦♦♦ GX 
SR»CO = ♦*•♦*• GX 
SJVO = •*•*•* GX 
SCBDMG= *•*••* GX 



SERMSG: 


****** GX 


tLNDES= 


****** GX 


SFORM 


OOOOOORG 


$LNL'MB= 


****** GX 


$HDSIZ= 


****** GX 


$LSTi»T = 


.»•*.* GX 


SHEADG= 


****** 6X 


$PLNMB= 


****** GX 


SLINHD= 


****** GX 


SPUTLN 


00001 2RG 


SLNBUF= 


****** GX 







$SAVR6= •••♦•* GX 
$SRCPT= ****** GX 
$SyTCH= **♦•** GX 
SS = 000001 
.PUT = ****** G 



. ABS. 000000 000 
00042A 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 898 WORDS ( 4 PAGES) 
DYNAMIC MEMORY: 1574A WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:11 
CAO,203PUTLN,C40.303PUTLN/-SP=CA0,10]MACFL.PUTLN 



•**t K B •*«• 




••«* I I •«•« 



I A*Aa K MA#>akM M44AB 4i^_Ke^_99 1A.i.O &A/ 



SCSLP MACRO Ml 108 U-DEC-77 10:A9 PAGE 2 



.TITLE SCSLP 
.IDENT /OA/ 



6 

7 



COPYRIGHT 197A, DIGITAL EQUIPMENT CORP., MAYNARD, MASS. 
COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE 
ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION 
OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT 
AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC. 

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY 
OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION 04 

D.N. CUTLER 16-0CT-72 

MONITOR DEPENDENT COMMAND STRING ANALYSIS ROUTINES 

MACRO LIBRARY CALLS 

.MCALL CSIS1.CSIS2 

••-ISCANI/ISCANO-SCAN FOR INPUT/OUTPUT FILE SPECIFCICATION 

THIS ROUTINE IS CALLED TO SCAN A COMMAND STRING FOR THE NEXT INPUT 
OR OUTPUT FILE. ISYNTX MU'.T HAVE BEEN PREVIOUSLY CALLED TO SET UP 
THE COMMAND BUFFER AND TO DO THE SYNTAX ANALYSIS. 



INPUTS: 



RO«ADDRESS OF RECORD BLOCK. 
RUADDRESS OF TEMP BUFFER AREA. 



OUTPUTS : 



C»1 IF NO FILE SPECIFIED OR ILLEGAL SWITCH. 

C«0 IF REQUEST IS 5UCESSFUL. 

IN EITHER CASE RO IS RETURNED AS THE MORE FILES FLAG. 

:F RO EQ 0, THEN MORE FILES ARE SPECIFIED. 

IF RO EQ 1. THEN NO MORE FILES ARE SPECIFIED. 



$2 000000 
^3 000006 
000010 
000016 
000022 
00002^ 



112761 000001 000000 ISCANI : :MOVB 
000403 BR 

112761 000002 000000 »SCANO::MOVB 

SCANO: SAVRG 
010005 MOV 

CSIS2 



#CS.INP,C.TYPR(R1);SET FOR INPUT FILE 
SCANO : 

#CS.0UT,C.TYPR(R1);SET FOR OUTPUT FILE 

;5AVE NONVOLITILE REGISTERS 
R0,R5 .-SAVE RECORD BLOCK ADDRESS 
R1..RSSWBK(R5) ;GET FILE SPECIFICATION 



••** M 8 **** 



cr«i D HArt'o Miinft u.nrr.77 lOiiO pacf ?-1 



58 OOOOAO 

59 0000A2 

60 0000A6 

61 000050 

62 000054 

63 000056 
tA 000062 

65 000064 

66 000072 

67 000074 

68 000102 

69 000104 

70 000112 

71 000114 

72 000120 

73 000124 

74 000130 

75 000132 

76 000134 

77 000136 

78 000140 

79 000142 

80 000144 

81 000146 

82 000150 

83 000152 

84 000154 

85 000156 
86 

87 
88 
89 
90 

91 000160 

92 000162 

93 000164 
94 

95 
96 
97 
98 
99 000166 

100 000170 

101 000172 

102 000176 
103 

104 
105 

IS? 

108 000200 

109 000202 

110 000204 

111 000210 
IV 

113 
114 



010102 
116204 
103444 
132704 
001464 
132704 
001041 
022762 
103447 
022762 
103436 
022762 
103425 
016505 
062702 
012746 
012203 
010325 
012201 
012500 
005303 
002402 
112120 
000774 
005316 
003366 
005726 
000424 



012701 

OOOG 
000402 



-OEC-77 10:49 PAGE 2-1 












MOV 


R1,R2 


COPY CSI BLOCK ADDRESS 


000001 




MOVB 


C.STAT(R2).R4 


GET STATUS BYTE 






BCS 


10$ 


IF CS ILLEGAL SWITCH 


000005 




BITB 


(»CS.NMF1CS.DVF,R4;F1LE OR DEVICE SPECIFJtD? 1 






BEQ 


60S 


IF EQ NO 


000010 




BITB 


«CS.yLD,R4 


WILD CARD SPECIFIED? 






BNE 


20S 


IF NE YES 


OOOOOOG 000006 




CMP 


«FSDEVL,C.DEVD(R2);LEGAL DEVICE NAME LENGTH? 1 






BLO 


40S 


IF LO NO 


OOOOOOG 000012 




CMP 


«FSDIRL.C.D1RD(R2);LEGAL DIRECTORY NAME LENGTH? 1 






BLO 


35S . 


IF LO NO 


OOOOOOG 000016 




CMP 


#FSFILL.C.FILD(R2);LEGAL FILENAAME LENGTH? 






BLO 


^OS 


IF LO NO 


OOOOOOG 




MOV 


F.DSPT(R5).R5 


GET ADDRESS OF DATA SET DESCRIPTOR 


000006 




ADD 


»C.DSDS.R2 


•POINT TO CSI DATA SET DESCRIPTOR 


000003 




MOV 


#3,-(SP) 


SET LOOP COUNT 




Sit 


MOV 


(R2)*,R3 
R3.(R5)+ 


•GET LENGTH OF LINE SEGMENT 






MOV 


STORL- IN DESCRIPTOR 






MOV 
MOV 


(R2)*.R1 
(R5)t,R0 


GET ADDRESS OF LINE SEGMENT 
•GET ADDRESS TO STORE LINE SEGMENT 




Sli 


MOVB 
BR 


(R1)*.(R0)* 
5S 


DECREMENT BYTE COUNT 
IF LT DONE 




fli 


w 


(SP) 
3S 


DECREMENT LOOP COUNT 
IF GT MORE TO GO 






w 


(SP)* 
70S 


CLEAN STACK 




; ILLEGAL SWITCH SPECIFICATION 





OOOG 



012701 

OOOG OOOG 
062702 000016 
000411 



012701 

OOOG OOOG 
062i'02 000012 
00OAO4 



10S: MOV (PC)»,R1 

.BYTE ESR11.SSV2 
BR 30S 



ILLEGAL FILE SPECIFICATION 



20S: MOV (POt.RI 

.BYTE ESR12.StV2 

SOS: ADD #C.FILD,R2 

W 50S 



ILLEGAL DIRECTORY NAME 



S5I« MOV (Pv.,».R1 

.BYTE ESR17,S$V2 

ADD «C.DIRD.R2 

•I 50S 



: ILLEGAL DEVICE SPECIFICATION 



GET FRROR, SEVERITY 
FATAL -NO RETURN 



.-GET ERROR, SEVERITY 

.•FATAL -NO RETURN 

.'POINT TO FILENAME DESCRIPTOR 

; 



GET ERROR, SEVERITY 

FATAL -NO RETURN 

POINT TO DIRECTORY NAME 



•••• N 8 **** 



SCSLP MACRO mi 08 U-DEC-77 10:49 PAGE 2-2 



115 
116 

117 00021? 

118 0002H 

119 000216 

120 000222 

121 000226 

122 000230 

123 000232 
12A 00023A 

125 0002A0 

126 000242 

127 000244 

128 000246 
129 

130 
131 
132 
133 
134 
135 
136 
137 
138 
139 
140 
Ui 
142 
143 
144 
145 
146 

147 000250 

148 000254 

149 000260 

150 000266 

151 000270 

152 000272 
153 
154 
155 

156 

157 000310 
158 
159 





276 


U(<J 


306 



012701 

OOOG OOOG 
062702 000006 

000261 

006046 

005000 

132704 000020 

001001 

005200 

006126 



012061 000002 
011061 000004 

103010 
010102 

062702 000002 
012701 

OOOG OOOG 

U00261 
000001 



; 

40$: 



50$: 
60$: 
70$: 



80$: 



MOV 

.BrTE 

ADD 

CALL 

SEC 

ROR 

CLR 

BIT3 

GNE 

INC 

ROL 

RETURN 



(PC)*.R1 
E$R13,S$V2 
#C.DEVD,R2 
$ERnS6 

-(SP) 

RO 

«CS.K0R.R4 

80$ 

RO 

(SP)» 



GET ERROR.SEVERITV 

FATAL-NO RETURN 

POINT TO DEVICE NAME DESCRIPTOR 

OUTPUT ERROR MESSAGE 

SET CARRY 

SAVE CARRY BIT 

ASSUME MORE FILES ARE SPECIFIED 

MORE FILES? 

IF NE YES 

SET NO FILES 

RESTORE CARRY 



••-$SYNTX-COMMAND STRING SYNTAX ANALYSIS 

THIS ROUTINE IS CALLED TO ANALYZE A COMMAND STRING FOR CORRECT SYN- 
TAX AND TO SET UP THE COTMANO BUFFER FOR THE ABOVE SCAN ROUTINES. 



INPUTS: 



RO>ADDRESS OF BYTE COUNT. RE C ADOR DOUBLEVORD. 
RUADDRESS OF TEMP BUFFER AREA 



OUTPUTS: 



$SYNTX: 



C>1 IF SYNTAX ERROR. 
C>0 IF NO SYNTAX ERROR. 



10$: 



:M0V 
MOV 
CSI$1 
BCC 
MOV 
ADD 
MOV 
.BYTE 
CALL 
SEC 
RETURN 

.END 



(R0)*.C.CMLD(R1):SET LENGTH OF LINE 
(R0).C.CMLD«2(R1);SET ADDRESS OF LINE 
R1 ; ANALYZE SYNTAX 

10$ :IF CS RETURN 

R1.R2 .'COPY ADDRESS OF CSI BLOCK 
»C.CMLD.R2 :POINT TO LINE SEGMENT DESCRIPTOR 
(PO^.RI .'SYNTAX ERROR 
E$R14,S$V1 .'DIAGNOSTIC 
$ERMS6 .'OUTPUT ERROR MESSAGE 
.'SET CARRY 



*••• § 9 ttt* 



SCSLP MACRO mi08 
SYMBOL TABLE 



U-DEC-77 10: A9 PAGE 2-3 



CS.D1F= 000002 




C.DEVD= 


000006 


CS.DVF= OOOOOA 




C.DIRD= 


000012 


CS.EQU^ OOOOAO 




C.DSDS= 


000006 


CS.1NP= 000001 




C.FILD= 


000016 


CS.M0R= 000020 




C.MKW1= 


00002A 


CS.NMF= 000001 




C.MKW2= 


000026 


CS.OUT- 000002 




C.S1ZE= 


00005A 


CS.yLD= 000010 




C.STAT= 


000001 


C.CMLD= 000002 








. ASS. OOOCOO 


000 






000312 


001 






ERRORS DETECTED: 










C.SUAD= 000022 
C.TYPR= 000000 

ESR11 = *•♦•*• GX 

E$R12 = ••♦♦♦* GX 

E$R13 = •♦»*•* GX 

E$RU = *♦**•* GX 

E$R17 = ♦*♦♦♦* GX 

F$DEVL= **••*» GX 



F$DIRL= ♦♦♦*♦♦ GX 
F$FILL= ♦•♦**♦ GX 
F.DSPT= ♦»♦**♦ GX 
PAR$$S= 000001 
R$SWBIC= ♦♦♦»*« GX 
SCANO 00001 6R 
S$V1 = ****** GX 
S«V2 = ****** GX 



$ERMSG= ****** GX 
$SAVRG= ****** GX 
SSCANI OOOOOORG 
SSCAAK) 00001 ORG 
SSVNTX 000250RG 
$$ = 000001 
.CSI1 = ****** G 
.CSI2 = ****** G 



VIRTUAL MEMORY USED: 1252 WORDS ( 5 PAGES) 
DYNAMIC MEMORY: 1S7AA WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:08 
CA0,20]SCSLP.CA0.30]SCSLP/-SP=CA0.10]MACFL, SCSLP 

XMU 



•ttft c 9 **** 




•••• D 9 *«*t 



SLPR11 MACRO mi 08 U-OEC-77 10: A9 PAGE 2 



1 
2 
3 
A 
5 
6 
7 
8 
9 
10 
11 
12 
13 
U 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
SO 
51 

8 



II 

55 000000 



.TITLE SLPR11 
.lOENT /09/ 



COPYRIGHT (C) 1975,1976,1977 

DIGITAL EQUIPMENT CORPORATION. NAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A 
SINGLE COMPUTER SYSTEM AND N/.Y BE COPIED ONLY WITH THE 
INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE, OR 
ANY OTHER COPIES THEREOF, NAY NOT BE PROVIDED OR OTHERWISE 
MADE AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH 
SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE 
TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN 
IN DEC. 

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF 
ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION 09 

D.K CUTLER 4-JAN-72 

MODIFICATIONS: 

C. MONIA 11-SEP-75 

CM001 — ADD USER-SPECIFIED AUDIT TRAIL 

C. MONIA 17-JAN-77 

CM003 — ADD /CM SWITCH. INCREASE INDIRECT FILE DEPTH. 

E. BAATZ 10-MAR-77 

EB029 — MAKE GCML PASS LOWER-CASE CHARACTERS 

E. BAATZ 28-JUN-77 

EB061 ~ A "-" AS THE LAST CHARACTER OF A LINE SHOULD \'0T 
INDICATE A CONTINUATION LINE 

JAKOOI 24-AUG-77 ADD EXIT WITH STATUS 

SOURCE LANGUAGE INPUT PROGRAM (SLIPR) 

MACRO I IBNARY CALLS 



.MCALL GCMLD* 
GCMLDI 



.■DEFINE GET COMMAND LINE CONTROL BLOCK 



••tt [ 9 •«#• 



SLPRIl MACRO mi08 U-OEC-77 10:A9 PAGE 2-1 



86 000000 

87 000002 

88 000004 

89 000006 

90 000010 

91 000012 

92 OOOOU 

93 000016 

94 000020 

95 000022 

96 000024 

97 000026 

98 000030 

99 000032 

100 000166 

101 000306 

102 000406 

103 000410 



09 000412 



000001 
000002 
000004 
000010 
000020 
000040 
000100 
000200 
000400 
001000 



000032' 



014 



EQUATED SYMBOLS 

OPTION SWITCH WORD BIT DErlNITIONS 



APSNO=: 
D6SLL=: 
DESLFxi 
ID$RT== 
CRWI== 
LL»ST== 
SRtC0«> 
BLSNK«: 
SP$0L== 



rOOOOOl 

000002 
=000004 
000010 
000020 
000040 
000100 
000200 
000400 
001000 



;Ar!»ENO ••;**-NEW»»" AND CONPRESS (0=rES) 
.-DOUBLE SPACE LINE LISTING (1=YES) 
;DELETE CORECTION INPUT FILE (1=YES) 
.-INDIRECT FILE RECOGNIZATION (O-YES) 
.•CORECTION INPUT FILE SPECIFIED (1=YES) 
.■LINE LISTING FILE SPECIFIED (1=YES) 
.•SOURCE OUTPUT FILE SPECIFIED (1=YES) 
.•BLANK FILL TO PAD LINES (0=YES) 
;SPOOL LISTING FILE (0=YES) 
.•COMPRESS AUDIT TRAILS (1=YES) 



CM003 



MACRO LIBRARY CALLS 



.MCALL CLOSES. DELETt.EXITSS.F INI TS, PRINTS. PUTS 

LOCAL DATA 

MISC VARIABLES-ADJACENCY ASSUMED 



SAUBEG 


:.BLKW 




•ADDRESS OF AUDIT TRAIL FIRST BYTE 


SAULGN 


:.BLKW 




LENGTH OF AUDIT SEGMENT 


SCFNMB 


r.BLKW 




CORRECTION INPUT FILE LINE NUMBER 


SCMFLG 


r.BLKW 




COMMAND INPUT SOLICATION FLAG 


SCMLGH 


: .BLKW 




-MAX. SIZE OF COMPRESSED LINE 


SLNDEL 


: .BLKW 




NUMBER OF LINES DELETED 


SlNUMB 


r.BLKW 




CURRENT LINE NUWER 


SPDSI2 


:.BLKW 




PAD SPECIFIED BY USER 


SPDLGN 


:.BLKW 




LENGTH OF PAD FIELD 


SPLUMB 


:.BIKW 




LINE IN CURRENT PAGE 


SSWTCH 


:.BLKW 




OPTION SWITCH WORD 


SHDSI7 


:.BLKW 




SIZE OF HEADING IN BYTES 




.WORD 


SHEADG 


HEADER BUFFER POINTFR 


SHEADG 


: .BLKW 


46. 


PAGE HEADING 


SOUTBF 


: .BLKW 


40. 


ERROR MESSAGE OUTPUT BUFFER 


TEMP: 


.BLKB 


100 


TEMP CSI BUFFER 


SPSAV: 


.BLKW 


1 


INITIAL SP VALUE 


SEXSTS 

; FORM 

* 


: .BLKW 
CONTROL 


1 


EXIT STATUS WORD 



; CM003 



;JAK001 



FORM: .BYTE 14 



CONTRO! BYTE STRING 



;FORM FEED 



•••• f 9 **** 



SLPR11 HACRO mi 08 U-OEC-77 10:49 PAGE 2-2 



115 000415 074 
000416 045 134 



057 055 CNTRL: .BrTE '<. V.'-.'X/\ ; 



121 000420 073 052 

000423 116 105 127 

000426 052 052 000 

1< 



: INITIAL LINE SUFFIX 
052 NEW: .ASCIZ /;**NEW«*/ 

.EVEN 



127 

128 000000 

129 000000 
130 

131 000000 

132 000000 



136 000432 



000 



; USER AUDIT TRAIL 

.PSECT tSAUDO.D.OVR 



SNEU: 
ENEW: 



.BLKB 8. 
.PSECT SSAUD1.D 
.BYTE 

.EVEN 

.PSECT 



141 
142 

143 000432 

144 000436 

145 000442 

146 000450 
147 

148 000456 

149 000464 

150 000470 

151 000474 

152 000500 

153 000504 

154 000510 

155 000512 

156 0005U 

157 000516 

158 000522 

159 000526 

160 000530 

161 000534 

162 000540 

;w4 

165 000556 

166 000562 

167 000564 

168 000566 



••-SSLIPR-SOURCE LANGUAGE INPUT PROGRVI 



016700 
012767 
142760 

152760 
010667 
012703 
016706 
012700 
012701 
005020 
005301 
1375 
2713 



10300, 
00016 



I 



12767 



710 
1741 
122767 



tSLIPR::FINITS 
OOOOOOG NOV 

OOOOOOG 177740 NOV 
000024 000141 BICB 



000010 000141 

177716 

000024* 

177706 

000004* 

000012 



000001 
000720 



OOOOOOC 177250 
OOOOOOG 177224 
OOOOOOG 



000057 OOOOOOG 



SLlPRl! 
5t: 

SLIPR3: 
lot: 



BIS8 

NOV 

NOV 

NOV 

NOV 

NOV 

CLR 

DEC 

BNE 

BIS 

CALL 

BCC 

JNP 

CALL 

CLR 

NOV 

NOV 

NOV 

TST 

BCQ 

CNP6 



.-INITIALIZE FILE STORAGE REGION 
SCNIPT.RO .-GET CONPWND INPUT RECORD BLOCK ADDRESS 
#EXtSUC.tEXSTS ; ASSUNE SUCCESS 
fGE.CONIGE.CLO.G.NOOE(RO) ;CLEAR CONTINUATION LINE 

; AND CLEAR CLOSE AFTER BITS 
«GE.LC.G.NODE(RO) ;SET TO PASS LOVER-CASE THROUGH 



SP.SPSAV 

»SSWTCH.R3 

SPSAV.SP 

ftCFNNB.RO 



SAVE INITIAL SP VALUE 

GET ADDRESS OF SWITCH OPTION WORD 

SET INITIAL SP VALUE 

GET ADDRESS OF NISC DATA 



;JAK001 
EB061 
EB061 
EB029 



«<tHDSI^-SCFNNB>/20,R1 ; GET MIVER TO CLEAR 



R1 
51 

«APSN0.(R3) 

%"^ 

SLPXT 

ICNPRS 

(R3) 



CLEAR SPECIFIED LOCATIONS 

DECRENENT COUNT 

IF NE GO AGAIN 

SURPRESS AUDIT TRAIL 
GET CONMAND INPUT LINE 
IF CC OKAY 
EXIT 

COfN>RESS LINE 
SET INITIAL OPTION SWITCH WORD 



fLiLGTH-AtUOEF»7k*C7,ipOLGH : SET DEFAULT NARGIN 
«ASUOEF.IAULGH ; SET DEFAULT AUDIT MELD SIZE 
MLNDES.RO ;GET ADDRESS OF LINE DESCRIPTOR 

(R0> .-NULL LINE? 

SLIPR1 ;|F EQ YES 

»'/.8LNBUF ;EXIT CONNAND? 



•••• G 9 ••«• 



SLPU11 HACRO M1108 U-DEC-77 10:49 ( 


»AG£ 2-3 








169 000574 


001002 






BNE 


20S 


;IF NE CONTINUE 


170 000576 


000167 


000652 




JW> 


SLPXT 


;EXIT 


171 000602 


012701 


000306* 


20$: 


NOV 


#TENP.R1 


;CET ADDRESS OF CSI BUFFER 


172 000606 








CALL 


SSVNTX 


.-ANALYZE SYNTAX OF LINE 


173 000612 


103726 






BCS 


SLIPR1 


;IF CS SYNTAX ERROR 


174 000614 


016700 


OOOOOOG 




NOV 


SSRCPT.RO 


.-GET SOURCE OUTPUT RECORD BLOCK 


175 000620 


012701 


000306' 




NOV 


fTENP.HI 


:GET ADDRESS OF CSI BLOCK 


176 000624 








CALL 


SSCANO 


.SCAN FOR OUTPUT FILE 


177 000650 


103402 






BCS 


31S 


:IF CS NO OUTPUT FILE 


178 000632 


052713 


000100 




BIS 


tSRSC0,(R3) 


;SET SOURCE OUTPUT BIT 


179 000636 


016700 


OOOOOOG 


31 S: 


NOV 


SLSTPT.RO 


:GET LINE LISTING RECORD BLOCK 


180 000642 


012701 


000306' 




NOV 


#TENP,R1 


;GET ADDRESS OF CSI BLOCK 


181 000646 








CALL 


SSCANO 


.•SCAN FOR OUTPUT FILE 


182 000652 


103414 






BCS 


4S 


;IF CS NO OUTPUT FILE 


183 000654 


052713 


000040 




BIS 


#LLSST.(R3) 


:SET LINE LISTING BIT 


184 000660 








PUTS 


SLSTPT.#F0RN.#1 JOUTPUT A FONN FEED' 1 


185 000704 


016700 


OOOOOOG 


4S: 


NOV 


SCFIPT.RO 


;GET CORRECTION INPUT FILE RECORD BLOCK 


186 UU0710 


012701 


000306' 




NOV 


«TENP.R1 


.-GET ADDRESS OF CSI BLOCK 


187 000714 








CALL 


SSCANI 


;SCAN FOR INPUT FILE 


188 000720 


103402 






BCS 


5S 


;IF CS NO INPUT FILE 


189 000722 


052713 


000020 




BIS 


«CRSFI.(R3) 


.-SET CORRECTION FILE BIT 


190 00U726 


032713 


000160 


51: 


BIT 


fCRSFIlLLSST! 


SRtC0.(R3);ANY FILE SPECIFIED? 


191 000732 


001656 






BEQ 


SLIPR1 


:IF EQ NO-IGNOR LINE 


192 000734 








CALL 


SOPNFL 


.•OPEN ALL FILES 


193 000740 


103002 






BCC 


51S 


: IF C/C OK 


194 000742 


000167 


000412 




JNP 


SRSTRT 


: ELSE RESTART 


195 000746 


012700 


OOOOOOG 


51S: 


NOV 


fSLNDES.RO 


; GET LINE DESCRIPTOR ADDRESS 


196 000752 


012067 


177050 




NOV 


(RO)*.SHDSIZ 


;SET SIZE OF HEADING IN BYTES 


197 000756 


062767 


000010 177042 




ADD 


«10.SHDSIZ 


;ALLOU 'OR LINE SPACING CHARACTERS 


198 000764 


011000 






NOV 


(RO) .RO 


.GET ADDRESS OF LINE BUFFER 


199 0C3766 


012701 


000032' 




NOV 


«SHEA06,R1 


:GET ADDRESS OF HEADING BUFFER 


200 000772 


112021 




61: 


NOVB 


(R0)*.(R1)» 


;NOVE LINE TO HEADING 


201 000774 


001376 






BNE 


6S 




202 000776 


005301 






DEC 


R1 


;BACK UP R1 


203 001000 


012700 






NOV 


(PC)».RO 


;GET CR.LF 


204 001002 


015 


012 




.BVTE 


15,12 




205 001004 


012702 


000010 




NOV 


«10.R2 


:SET REPEAT COUNT 


206 001010 


110021 




611: 


NOVB 


R0.(R1}« 


.'STORE A BYTE 


207 001012 

208 001014 


^}^ 






SUAB 
DEC 


RO 
R2 


;SUAP HALVES 
.'REPEAT? 


209 001016 


003374 






BGT 


61S 


.'IF GT YES 


210 001020 


005267 


17676< 




INC 


SCNFLG 


.•SFT Mmti rnMUMn tMPtir 


211 001024 

212 001032 


026727 
101022 


176752 OOOOOOC 




CNP 
BNI 


SAULGH.#ENEW-SNEW ; LEGAL AUDIT LENGTH? 1 
90S ■ tr ui kin 1 


215 001034 

214 001040 

215 001042 


001402 


000016' 


60S: 


NOV 
TST 
BEQ 


tSPDSI/.RO 

(RO)* 

63S 


.GET LENGTH OF PAD FIELD 
.PAD FIELD SPECIFIED? 
; IF EQ NO 


216 001044 


016010 


177776 




NOV 


-2(R0>,(R0) 


;SET UP MARGIN 


217 001050 06Z710 

218 001054 03411 
21$ 001056 042710 

220 001062 016701 

221 001066 061001 

222 001070 103403 

223 001072 020127 

224 001076 101402 

225 001100 


000007 

000007 
176714 

0000006 


63S: 
901: 


ADD 
BCS 
BIC 
NOV 
ADD 
BCS 
CNP 
BLOS 


#7.(R0) 

90i 

#7.(R0) 

SAULGH.RI 

(RO).Rl 

90S 

R1.#LSLGTH 

95i 


;ROUN0 UP TO NEXT TAB LINIT 

.'If C/S ERROR 

.•CLEAR EXCESS 

;GET AUDIT FIELD SIZE 

;AOD PAD LENGTH 

.'IF C/S ERROR 

; LEGAL LENGTH 

;IF LOS YES 



•••• H 9 •••• 



SLPR11 NACRO KI1108 U-OEC-77 10:A9 PAGE 2-A 



226 001100 

227 001104 

228 001104 

229 001110 
250 001 1U 
231 001116 
252 001120 
255 001124 

254 001126 

255 001150 

256 001154 

257 001154 

258 001140 

259 001142 

240 001146 

241 001152 

242 001154 
245 001162 

244 001164 

245 001560 

246 001566 

247 001570 

248 001400 

249 001410 

250 001420 

251 001430 
252 

255 
254 
255 
256 

257 001454 

258 001440 

259 001444 

260 001450 
261 

262 
265 
264 
265 
266 

267 001454 

268 001464 

269 001474 

270 001504 

271 001514 

272 001520 
273 

274 

¥A 

?78 
?79 



000167 000350 

012700 000420' 

012701 000000* 
112021 

001576 

012700 000010' 

005710 

001002 

016710 176664 

062710 000007 

105555 

042710 000007 

103540 

052767 XXKOO 176642 

001076 

052767 000004 176456 
001404 



000167 177054 



95$: 



100»: 



97$: 



JHP 

nov 

MOV 

MOVB 

BNE 

wv 

TST 
BNE 
MOV 



ERXT 

#NEy.RO 

ir$NEW.R1 

{R0)*.(R1)* 

100$ 

nCMLGH.RO 

(RO) 

97$ 

$PDLGH.(RO) 



012702 OOOOOOG 
012701 OOOOOOC 

000167 000054 



016700 176670 





ADD 


#7,(R0) 




BCS 


ERXT 




BIC 


#7,{R0) 




CALL 


SLPR11 




BCS 


SLPXT 




BIT 


#SP$OL.$SWTCH 




BNE 


$RSTRT 




PR1NT$ 


$LSTPT 


$RSTRT: 


:BIT 


fOE$LF.$SWTCH 




BEQ 


10$ 




DELET$ 


$CF1PT 


10$: 


CL0SE$ 


$CFIPT 




CLOSE$ 


$LSTPT 




CLOSE$ 


$SRCPT 




JMP 


SLIPR1 


; ERROR 


EXIT 




ERXT: 


MOV 


«$LNDES.R2 
*S$V2*400!E$R 




MOV 




CALL 


$ERMSG 




JMP 


SLPR1 


1 


EXIT SEQUENCE 


SLPXT: 


CLOSE$ 


$cnPT 




CLOSE$ 


$CMIPT 




CLOSE$ 


$LSTPT 




CLOSE$ 


$SRCPT 




MOV 


$EXSTS.R0 




CALL 


$EXST 



ELSE ERROR 

GET ADDRESS OF DEFAULT AUDIT TRAIL 
GET ADDRESS OF BUFFER 
SETUP STRING 

LOOP UNTIL END OF STRING 
GET ADDRESS OF TRUNCATION LENGTH 
TRUNCATION LENGTH SPECIFIED? 
IF NE YES 
SET DEFAULT TRUNCATION LENGTH 

ROUND TO TAB STOP 
IF C/S ERROR 

CALL EDITOR 

IF CS EXIT 

SPOOL OUTPUT? 

IF NE NO 

PRINT LISTING FILE 

DELETE CORRECTION INPUT FILE? 

IF EQ NO 

DELETE CORRECTION INPUT FILE 

CLOSE CORRECTION INPUT FILE 

CLOSE LINE LISTING FILE 

CLOSE SOURCE OUTPUT FILE 

GO AGAIN 



;GET ADDRESS OF LINE DESCIPTOR 
,R1 ;GET ERROR. SEVERITY 
; ISSUE ERROR MESSAGE 
; GO AGAIN 



; CM003 

;*-1 



CM003 
CM003 
CM003 
CM003 
CM003 
CM003 
CM003 
CM003 



CLOSE CORRECTION INPUT FILE 
CLOSE COMnA{« INPUT FILE 
CLOSE LINE LISTING FILE 
CLOSE SOURCE OUTPUT FILE 

GET EXIT STATUS 

CALL EXIT ROUTINE 



:JAK001 
;JAK001 
:*»-1 



; **-MAIN BODY OF ACTUAL EDITOR 



; INPUTS: 

i 

I R3«ADDRESS OF OPTION SWITCH WORD. 

; OUTPUTS: 



•••• I 9 *••• 



103A23 

012700 OOOOOOG 

112005 

01270A 000A13' 



032713 000020 
00U22 



SLPR11 HACRO miOB U-OEC-77 10:49 PAGE 2-5 



283 
28A 
285 
286 

287 001524 

288 001530 

289 001 53A 

290 001536 

291 001 5A2 

292 001 5U 

293 001550 

294 001554 

295 001560 
2% 001564 

297 001566 

298 001572 

299 001576 

300 001602 
301 

302 
303 
304 
305 

306 001604 

307 001606 

308 001610 

309 001612 

310 001616 

311 001622 

312 001624 
313 

314 
31 S 
316 
317 

318 001626 

319 001632 

320 001636 
321 

322 
323 
324 
325 

326 001640 

327 001644 

328 001646 



000413 



005002 
012701 
OOOG 



000261 
000410 



C=1 IF PREMATURE EOF OR ERROR ON COMMAND INPUT FILE. 
C=0 IF SUCESSFUL REQUEST. 



SAVE NONVOLITILE REGISTERS 

GET COMMAND INPUT LINE 

IF CS EOF OR ERROR 

GET ADDRESS OF LINE BUFFER 

GET FIRST BYTE 

GET ADDRESS OF CONTROL BYTE STRING 

SHIFT? 

FILE MARK? 

CORRECTION INPUT FILE? 

IF EQ NO 

MINUS^ 

ENABLE AUDIT TRAIL? 

DISABLE AUDIT TRAIL? 



OOOG 



000754 



SLPR11: SAVRG 




SLPR1 : CALL 


SGTCML 


BCS 


1$ 


MOV 


MLNBUF.RO 


MOVB 


(R0)*.R5 


MOV 


«CNTRL.R4 


JOL 




JOL 




BIT 


#CR$FI.(R3) 


BEQ 




JOL 




JOL 




JOL 




■R 




; EOF OR ERROR 


ON COMMAND I 


11: CLR 


R2 


MOV 


{PC)*.R1 


.BYTE 


ESRIS.SSVO 


CALL 


SERMSG 


CALL 


SCOPYF 


SEC 




BR 


5S 


; SHIFT COMMAND 


«) 


Mi CALL 


»SHIFT 


Sit CALL 


IPUTLN 


BR 


SLPR1 


; FILE MARK (/) 





000241 



4li 

Sli 



CALL 

CLC 

RETURN 



SCOPYf 



SET DUMMY PARAMETER BLOCK ADDRESS 

PREMATURE EOF OR ERROR 

DIAGNOSTIC 

OUTPUT ERROR MESSAGE 

COPY REMAINDER OF CORRECTION FILE 

SET CARRY 

COMMON EXIT 



SHIFT LINE LEFT ONE CHARACTER 
PUT LINE IN OUTPUT FILES 
GO AGAIN 



COPY REMAINDER OF F^LE 
CLEAR CARRY 



POSITION/DELETION COMMAND <-N OR -N,M) 



001650 
001654 



000725 



Mt CALL SPOSir 
M SLPR1 



ENABLE AUDIT TRAIL (I) 



.•POSITION FILE 
.■CONTINUE 



•••• J 9 *•** 



1 



SLPR11 MACRO mi 08 U-OEC-77 10: A9 PAGE 2-6 



3A0 

3A1 001656 

342 001662 

343 001664 

344 001670 

345 001674 
346 

347 
348 
349 
350 

351 001676 

352 001702 
353 

354 



032713 000001 

001722 

005067 176122 

042713 000001 

000715 



052713 000001 
000712 



7tt BIT «APSND.(R3) 

BEQ SLPR1 

CLR SLNDEL 

BIC «AP$ND,(R3) 

W SLPR1 



; DISABLE AUOIT TRAIL (\) 



Mt BIS «AP$ND,(R3) 
BR SLPR1 



;AUOIT TRAIL ENABLED? 
;IF FQ YES, CONTINUE 
; CLEAR DELETION COUNT 
: ENABLE AUDIT TRAIL 
: CONTINUE 



.-DISABLE AUDIT TRAIL 
.-CONTINUE 



000432' 



.END SSL I PR 



*••• K 9 •*•« 



rr 



SLPftn MACRO mi08 
SYieOL TABLE 



U-OEC-77 10:49 PAGE 2-7 



APtND ": 
AtUDEFs 
BLSNK - 
C»«PR = 
CNTRL 
CWFI » 
DBSLL = 
DESLF = 
ENEW 
ERXT 
EXSSUC- 
ESRU r 
E»R15 = 
FO.OSP* 
FO.RECs 
FORM 
F.BOe ' 
F.ERR » 
F.FNB « 
F.LUN «= 
F.NRBD= 
GE.BIFs 
GE.CLO<= 

. A8S. 



000001 6 
****** GX 

000200 G 
001000 G 
000A13R 
000020 G 

000002 G 
000004 G 
OOOOOOR 
0OU34R 
****** GX 
****** GX 
****** GX 
****** GX 
****** GX 
000A12R 
****** GX 
****** GX 
****** 
****** 
****** 
177775 
000004 



GX 
GX 

GX 



000000 
001704 
StAUDO 000010 
SSAU01 000002 
ERRORS DETECTED: 



Gr.COH= 
GE.:iN= 
GE.EO-^ 
6E.I» «= 
GE .OR- 
GE.c' = 
GE.MDE 
GE.OPR= 
003 GE.RBG= 
GE.SIZ= 
G.CNLD= 
G.DPRf<l== 
G.ERR = 
G.ISIZ= 
G.LUCW= 
G.LUFB= 
G.LUNA^ 
G.LUNU^: 
G.MODE= 
G.PSDS= 
G.SIZE= 
IDSRT = 
LLIST = 

OUO 
001 
00. 
003 



000001 

000020 

177766 

000002 

177777 

000010 

177774 

177776 

177730 

000040 

000146 

000160 

000140 

000020 

000004 

000003 

000000 

000002 

000141 

000142 

000224 

000010 G 

000040 G 



L$LUTH= 


****** GX 


TENP 


NEW 


OOC420R 


SAUBEG 


N.DID = 


****** GX 


SAULGH 


N.FJD = 


****** GX 


$CFIPT= 


N.FVER= 


****** GX 


SCFNMB 


PAR$SS= 


000067 


SCNFLG 


SLIPR1 


0004 70R 


$C«IPT= 


SLIPR3 


000526R 


SCMLGH 


SLPR1 


001530R 


$CMPRS= 


SLPR11 


001524R 


$COPYF= 


SLPXT 


001454R 


$OSPAT= 


SPSAV 


000406R 


SERnSG= 


SPSOL :- 


000400 6 


SEXST = 


SR$C0 = 


000100 6 


fEXSTS 


S»VO = 


****** GX 


$GTCML= 


SSV2 = 


**•*•» GX 


SHDSIZ 


S.FDB = 


000140 


SHEADG 


S.FNAM= 


000006 


$LNBUF= 


S.FNB » 


000036 


SLNDEL 


S.FNBU' 


000017 


$LNDES= 


S.FNTY= 


000004 


SLNUMB 


S.FTYP= 


000002 


$LST?'i» 


S.NFEN^ 


000020 


SNEy 



VIRTUAL MEMORY USED: 3870 WORDS ( 16 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:32 
C40,20DSLPR11.C40,303SLPR11/-SP=[40.103MACFL.SLPR11 

'X H 



00030tR 


$OPNFL= 


****** GX 


000000 ^G 


SOUTBF 


0001 66RG 


000002 AG 


SPDLGH 


000020RG 


****** GX 


iPDSIZ 


00001 6RG 


ooooo4»;g 


SPLNMB 


000022RG 


000006RG 


$POSIT= 


****** GX 


****** GX 


$PUTLN= 


****** GX 


00001 0»G 


$RSTRT 


001360RG 


****** GX 


$SAVRG= 


****** GX 


****** GX 


SSCANI-- 


****** GX 


****** GX 


SSCANO= 


****** GX 


****** GX 


$SWFT= 


****** GX 


****** GX 


SSL I PR 


000432RG 


00041 ORG 


SSRCPTr 


****** GX 


****** GX 


SSWTCH 


000024RG 


000026RG 


SSYNTXsr 


****** GX 


000032RG 


$t 


000001 


****** GX 


$$SOST= 


000014 


0000 12RG 


.CLOSE= 


****** G 


*•*♦** GX 


.DELET= 


****** G 


00001 4RG 


.FIN1T= 


****** G 


****** GX 


.PUT = 


****** G 


OOOOOORG 


002 ...TPC= 


000140 



•••* I 9 •*•« 



r~~: 




*••• M 9 **t« 



I ftl A»b MArCIA M11AA li.- 



tvef-T? tn./.LI DAAC 3 



SLPSB MACRO Ml 108 U-DEC-77 10: A9 PAGE 2 



.TITLE SLPSB 
.IDlNT /06/ 



COPYRIGHT (C) 1975,1976.1977 

DIGITAL EQUIPMENT COpoQRATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A 
SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE 
INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE, OR 
ANY OTHER COPIES THEREOF. MAY NOT BE PROVIDED OR OTHERWISE 
MADE AVAILABLE TO ANV OTHER PERSON EXCEPT FOR USE ON SUCH 
SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE 
TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REKaiN 
IN DEC. 

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF 
ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION 06 

D.N. CUTLER 4-JAN-72 

MODIFICATIONS: 

C. MONIA 11-SEP-75 

CM001 — ADD USER SPECIFIED AUDIT TRAIL 

C. MONIA 11-FEB-77 

CM003 — ADD /CM SWITCH. INCREASE INDIRECT FILE DEPTH. 

MACRO LIBRARY CALlS 

.MCALL GE r t 

♦♦-$C0PVF-C0PY FILE 

THIS ROUTINE IS CALLED '0 COPY THE RE.WINOER OF THE COPHfCTlON INPUT 
FILE INTO THE SOURCE OUTPuT FILF. 

INPUTS: 

] R3«ADDRESS OF OPTION SWITCH WORD. 

; 

; OUTPUTS: 



I 



NONE. 



**•* M 9 •**« 



SLPSB MACRO Ml 108 U-DEC-77 1Cj49 PAGE 2-1 



58 

59 000000 

60 000004 

61 000006 

62 000012 

63 OOOOU 
6A 

65 



81 

82 000016 

83 000022 

84 000024 

85 000032 

86 000034 
67 000040 

88 000044 

89 000046 



II 



032713 
001403 

103375 



OOOOOOG 



103411 
032767 
001002 



000241 



50 016700 
54 



OOOOOOG 



$C0PYF::B1T 


#CRSFI,(R3) 


ANY CORRECTION INPUT FILE? 


BEQ 


2% 


IF FQ NO 


IS: CALL 


SCOPYL 


COPY A LINE 


BCC 


1$ 


IF CC GO AGAIN 


21: RETURN 







; **-JCOPYL-COPY LINE 

; THIS ROUTINE IS CALLED TO COPY A LINE FROM THE CORRECTION INPUT FILE 

; TO THE SOURCE OUTPUT FILE. COMPRESS IS CALLED IF THE LINE IS TO BE 

: COMPRESSED BEFORE IT IS WRITTEN INTO THE SOURCE OUTPUT FILE. 

• INPUTS: 

t NONE. 

; OUTPUTS: 

) C*1 IF EOF OR ERROR ON rORRECTlON INPUT FRE. 
) C-O IF LINE IS COPIED SUCESSFULLY. 



SCOPYL : 



OOOOOOG OOOOOOG 



1$: 



2S: 



:CALL 
BCS 
BIT 
BNE 
CALL 
CALL 
CLC 
RETURN 



IGTCFL 
2% 

#APtND.SSWTCH 

IS 

SCMPRS 

SPUTLN 



:GET LINE FROM CORRECTION INPUT FILE 

:1F CS EOF OR ERROR 

.•COMPRESS LINE? 

;IF NE NO 

; COMPRESS LINE 

;PUT LINE IN SOURCE OUTPUT I ILE 

.•CLEAR CARRY 



**-S6TCFL-6ET LINE FROM CORRECTION INPUT FILE 

THIS ROUTINE IS CALLED TO GET THE NEXT LINE FROM THE CORRECTION 
INPUT FILE. SGETLN IS CALLED TO READ THE LINE. 

INPUTS: 

NONE. 

OUTPUTS: 



C>1 IF EOF OR ERROR ON RECORD READ 
C>0 IF SUCESSFUL REQUEST 

SCFNMB IS INCREMENTED. 

IF COMPRESS MODE WAS SPECIFIED, THE LINE IS TRUNC- 
ATED AND TRAILING bLANKS AND SPACES REMOVt:D. 

SLNDES CONTAINS THE REVISED BYTE COUNT. 



CM003 
CM003 
CMOO! 
CMOO! 
CHIOO! 



•6TCFL::M0V ICMPT.RO ;GET CORRECTION INPUT FILE RECORD BLOCK 
GETS RO ;GET NEXT RECORD 



•«** B 10 *«** 



wwww o III wwvw 



SLPSB MACRO Ml 108 U 


-DEC-77 10:49 PAGE 2-2 










115 000060 


103014 






BCC 


20S 


IF CC OKAY 




116 000062 


122760 


177766 OOOOOOG 




CMPB 


#-10.,F.ERR(R0) 


■EOF? 




117 000070 


001406 






BEQ 


10$ 


IF FQ YES 




118 000072 


016002 


OOOOOOG 




MOV 


RSNAME(R0),R2 


-GET ADDRESS OF NAME STRING 




119 000076 


012701 






MOV 


(POt.RI 


CORRECTION FILE I/O ERROR 




120 000100 


OOOG 


OOOG 




•BYTE 


ESR16.SSV0 


DIAGNOSTIC 




121 000102 








CALL 


SERMS6 


OUTPUT ERROR MESSAGE 




122 000106 


000261 




10»: 


SEC 




SET CARRY 




123 000110 


000445 






BR 


70$ 




• CM003 


12A 000112 


062700 


OOOOOOG 


20S: 


ADD 


#F.NRBD,RO 


•POINT TO LINE DESCRIPTOR 


• ♦*-1 


125 000116 








CALL 


$OETLN 


GET NEXT LINE FROM FILE 




126 000122 


005267 


OOOOOOG 




INC 


SCFNMB 


■INC CORRECTION FILE LINE NUMBER 




127 000126 


032767 


OOOOOOG OOOOOOG 




BIT 


«CM$PR,$SWTCH 


•COMPRESS IN EFFECT? 


■ CM003 


128 0001 5A 


001433 






BEQ 


70$ 


IF EQ NO 


• CM003 


129 000136 


005000 






CLR 


RO 


ZERO HORIZONTAL POSITION COUNT 


- CM003 


130 OOOUO 


012701 


177777G 




MOV 


#$LNBUF-1 ,R1 


GET ADDRESS OF LINE BUFFER-1 


• CM003 


131 OOOUA 


010102 






MOV 


R1.R2 


COPY ADDRESS 


• :M003 


132 000U6 






30$: 








• CM003 


133 000U6 


005201 






INC 


R1 


POINT TO NEXT CHARACTER IN LINE BUFFER 


; CM003 


13A 000150 


105711 






TSTB~ 


(R1) 


AT END OF LINE? 


■ CM003 


135 000152 


001416 






BEQ 


60$ 


IF EQ YES 


CM003 


136 000154 


121127 


000040 




CMPB 


(R1}.«40 


SPACE? 


- CM003 


137 000160 


001407 






BEQ 


50$ 


IF EQ YES 


• CM003 


138 000162 


121127 


000011 




CMPB 


(R1).#11 


HORIZONTAL TAB? 


■ CM003 


139 000166 


001003 






BNE 


40$ 


IF NE NO 


CM003 


UO 000170 


052700 


000007 




BIS 


*7.R0 


ROUND TO TAB STOP 


• CM003 


HI 000174 


000401 






BR 


50$ 




■ CM003 


U2 000176 






40S: 








• CM003 


U3 000176 


010102 






MOV 


R1.R2 


RESET CURRENT END OF LINE POINTER 


; CM003 


144 000200 






SOS: 








■ CM003 


145 000200 


005200 






INC 


RO 


INCREMENT HORIZONTAL POSITION 


CM003 


146 000202 


020067 


OOOOOOG 




CMP 


RO,$CMLGH 


AT END OF LINE? 


CM003 


147 000206 


103757 






BLO 


30$ 


IF LO NO 


CM003 


148 000210 






60S: 








CM003 


149 000210 


005202 






INC 


R2 '. 


COMPUTE ADDRESS OF END OF LINE 


CM003 


150 000212 


105012 






CLRB 


(R2) 


TRUNCATE LINE 


CM003 


151 000214 


162702 


OOOOOOG 




SUB 


nLNBUF,R2 


COMPUTE NUMBER OF CHARACTERS IN LINE 


CM003 


152 000220 


010267 


OOOOOOG 




MOV 


R2.$LNDES 


RESET CHARACTER COUN^ 


CM003 


153 000224 






70S: 








CM003 


154 000224 
155 








RETURN 


! 




CM003 
**-1 


156 






; ♦ 










157 
158 






; ••-SPAOLN-PAO 


LINE 






159 
160 






; THIS 


ROUTINE 


IS CALLED TO PAD A LINE TO THE RIGHT MARGIN. 




1 W 

161 






; INPUTS: 
; 








163 






; 


RO«ADDRESS OF NfcXT BYTE 


N OUTPUT LINE. 




164 
1A5 






1 


Rl-HORIZONAL POSITION OF 


LINE. 




1 W^ 






; OUTPUTS: 








166 

171 000226 






i 


f*0«M!)ORESS OF NEXT BYTE 1 


N OL'TPUT LINE. 




016702 


OOOOOOG 


SMOLN: 


:MOV 


$PDLGH,R2 


GET LENGTH OF MARGIN ; CMOOl 














«*•• c 10 •••• 





SLPSB HACRO Ml 108 1/.-0EC-77 10: A9 PAGE 2-3 



172 000232 

173 00023A 
17A 000236 

175 0002AA 

176 000246 

177 000252 

178 000256 

179 000262 

180 00026A 

181 000266 

182 000272 

183 00027A 
18A 000276 

185 000300 

186 000302 
187 

188 

189 

190 

191 

192 

193 

19-' 

195 

196 

197 

198 

199 

200 

201 

202 

203 000304 

20A 000310 

205 000312 

206 0003U 

207 300320 
208 

209 



020102 CMP 

002017 a.E 

032767 OOOOOOG OOOOOOG BIT 
00U07 BEQ 

042701 000007 BIC 

062701 000010 ADD 

112720 000011 MOVB 

000761 BR 

005201 10$: INC 

112720 000040 MOVB 

000755 BR 

060200 20S: ADD 

160100 SUB 

010201 MOV 

RETURN 



H'l.^-?. 


■ANY MORE ROOM? 


20* 


IF 6E NO 


/WLSNK.SSWTCH 


BLANK FILL? 


10S 


■IF EQ YEi> 


#7.R1 
«l6.R1 


■CLEAR EXCESS BITS 


CALCULATE NEXT TAB STOP 


#11,(R0)t 


■S^ORE A TAB 


SPADLN 




R1 


■INCREMENT HORIZONAL POSITION 


»' AM)* 


INSERT A BLANK 


SPADLN 


■GO AGAIN 


R2,R0 


■ADD OFFSET TO MARGIN 


R1.R0 


5iiSrf«ACT HORIZONTAL POSITION 


R2.R1 


SET mi>i HORIZONTAL POSITION 



; CM001 



CMCO' 
CMC01 
CM001 
CM0C1 



••-SSHIFT-SHIFT LINE 

THIS ROUTINE IS CALLED TO SHIFT THE LINE IN SL^BUF LEFT ONE CHARACTER. 

INPUTS: 

RObADDRESS of second CHARACTER IN SLNBUF. 
SLNBUr CONTAINS LINE TO BE SHIFTED. 

OUTPUTS: 

SLNBUF IS SHIFTED LEFT ONE CHARACTER. 



012701 OOOOOOG 

112021 

001376 

005367 OOOOOOG 



000001 



;■ 



SSHIFT:,-.'10V iSLNBUF.RI 

IS: MOVB (R0)^.(R1)^ 

BNC IS 

DEC SLNDES 
RETURN 

.END 



.-GET ADDRESS OF LINE BUFFER 

.•MOVE A BYTE 

:IF NE GO AGAIN 

.■DECREMENT ACTUAL NUMBER OF BYTES 



*••• D 10 **** 



SLPSB MACRO M11 08 
SYMBOL TABLE 

APtND = *♦••«• GX 
BL»NK = ••♦•♦• 6X 
CM»PR = ••♦*♦• GX 
CR»F1 = **♦•** GX 
ESR16 = •♦*♦*• GX 
F.ERR = ••••♦♦ GX 



U-DEC-77 10: A9 PAGE 2-A 



F.NRflD= *»*♦•• GX $CMLGH= ♦♦•*** GX 

PAR$$$= 000000 $CMPRS= ****** 6X 

R$NAME= ****** GX SCOPYF OOOOOORG 

S$V0 = ****** GX SCOPYL 00001 6RG 

»CFIPT= ****** GX $ERMSG= ****** GX 

»CFNMB= ****** GX $GETLN= ****** GX 



SGTCFL 000050RG 
$LNBUF= ****** GX 
$LNDFS= ****** GX 
SPADLN 000226RG 
$POLGH= ****** GX 



$PUTLN= •**•♦♦ GX 
$SHIFT 00030ARG 
$SWTCH= ****** GX 
»$ = 000001 
.GET = ****** G 



. ABS. 000000 000 
000322 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 908 WORDS ( 4 PAGES) 
DYNAMIC MEMORY: 1S74A WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:10 
CAO , 20DSLPSB . C40 . 30] SLPSB/-SP=C AO . 1 0]MACF L .SLPSB 

ay 



• •*• f; 10 *«t* 




•••• f to **** 



DROSP MACRO CHIOS U-OEC-77 19:55 PAGE 2 



1 

2 

3 

<• 

5 

6 

7 

8 

9 
10 
11 
12 
13 
U 
15 
16 
17 
18 
19 
20 
21 
22 
23 
2A 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
30 
39 
40 
41 
42 
43 
44 
45 

46 000000 

47 000000 

48 000000 

49 000000 
50 

51 
52 
53 
54 
55 



.TITLE ORDSP 
.IDENT /10/ 



COPYRIGHT (C) 1974, 1978 

DIGITAL EQUIPMENT CORPORATION, NAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A 
SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE 
INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE, OR 
ANY OTHER COPIES THEREOF, MAY NOT BE PROVIDED OR OTHERWISE 
MADE AVAILMLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH 
SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE 
TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN 
IN DEC. 

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF 
ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION 10 

D. N. CUTLER 12-AUG-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
T. J. MILLER 

MODIFIED BY: 

T. J. MILLER 20-JUL-77 



• ADD CONNECT TO INTERRUPT TO DIRECTIVE DISPATCH 
TABLE. 



TM088 • 

DIRECTIVE DISPATCHER 
MACRO LIBRARY CALLS 



.MCALL HDRDFt.HWDDFt.TCBDFS.WDBDFt 

HDRDFt ;DEPINE TASK HEADER OFFSETS 

HWDDFI .DEFINE HARDWARE REGISTERS 

TCBDFS .-DEFINE TASK CONTROL BLOCK OFFSETS 

WDBDFS .DEFINE USER WINDOW DEF BLOCK OFFSETS 



; MACRO TO DEFINE SUCCESSIVE DIRECTIVE MASK BITS 



^ 



SYM«N 
N»N/2 



.MACRO DEFINE SYM 



•t** 6 to *•** 



OROSP NACRO W108 U-DEC-77 19:55 PAGE 2-1 



65 

66 000000 

67 000000 

68 000000 

69 000000 

70 000000 

71 000000 
72 



000002 
000200 



88 

89 
90 
91 



.ENDH 



EQUATED SYMBOLS 



DSPNXs2 
N=200 



DEFINE ACHKDB 

DEFI»€ CEFNCL 

DEFINE CEFNMT 

DEFINE DFCTSK 

DEFINE NUPCHK 

DEFINE SRSTCL 



INITIAL DIRECTIVE Mw'PING TABLE INDEX 

INITIAL PMSK VALUE 

ADDRESS CHECK PLAS DEFINITION BLOCK 

CALL SCEFN (1=rE5J 

EFN MUST BE SPECIFIED (UVES) 

TASK NAME DEFAULTS TO CURRENT TASK 

PERFORM MULTI-USER PROTECTION CHECK 

CALL SSRSTD (UVES) 



LOCAL MACROS 

'DEFINE DIRECTIVE DISPATCH TABLE ENTRY 

DIR ADDR, SIZE .MASK 

WHERE: 

ADDR'ADDRESS OF THE DIRECTIVE EXECUTION ROUTINE OR '.FALSE. 
SIZE>SIZE OF THE DPB REQUIRED BY THE DIRECTIVE ROUTINE. 
MASK^CONTROL BITS TO BE USED BY THE DIRECTIVE DISPATCHER. 



.MACRO DIR ADDR. SIZE. MASK 

. DSPMP+OFFST 
0FFST»0FFST»1 

.IF IDN <ADDR>,<. FALSE. > 

.BYTE 

.IFF 

.BYTE DSPNX 
DSPMK<0 

.IF NB <NASK> 

.IRP X.<MASK> 
DSPMK>DSPMK!X 

.ENDM 

.ENDC 
DSPSZ>0 

.IF NB SIZE 
DSPSZ«SIZE*2 

.ENDC 
.■IIS 

.WORD ADDR 

.BYTE DSPSZ.DSPMK 
DSPNX-DSPNXt4 

.ENDC 

.ENDM 



; LOCAL DATA-ADJACENCY ASSUMED 



•••• H 10 *••• 



DROSP HACRO W108 U-DEC-77 19:55 PAGE 2-2 




137 

138 OOOKK 

139 

UO 

HI 

1A2 OOOKK 

U3 000110 

UA 0001 U 

U5 000120 



153 

154 000124 

155 



i 



159 000124 

160 000130 

61 000130 

62 000130 

63 000134 
64 



000000 



USRPS: .BLKy 
BTRMV: .BLKU 


1 
1 


; DISPATCH MAPPING TABLE 


DSPMP: .BLKB 


64. 


.IF DF 


CSSINT 


.BLKB 


2 


.ENDC 




; DIRECTIVE DISPATCH TABLE 
; 


DSPTBL : 




OFFSTrO 




DIR 
DIR 
DIR 
DIR 


$DRQI0.12. 
$DRQI0.12. 
tDRGLI.3. 
SDRASG,4. 



;POI ER TO USER PS WORD 
.•BYTES TO REMOVE ON EXIT 



.•ALLOCATE SPACE FOR CONNECT TO INTERRUPT 



TM088 
TM088 
TM088 
TM088 
TM088 
TM088 
TM088 
TM088 



;REF LABEL 



001. -QUEUE I/O 
003. -QUEUE I/O AND WAIT 
005. -GET LUN INFORMATION 
007. -ASSIGN LUN 



.IF DF ASSPRI 

DIR IDRATP.4.,<DFCTSK.SRSTCL> ;009. -ALTER TASK PRIORITY 

.IFF 

DIR .FALSE. ;009. -ALTER TASK PRIORITY 

.ENDC 



DIR $DRREQ.7..SRSTCL :011 .-REQUEST TASK 

DIR .FALSE. ;013. -INVALID DIC 

DIR .FALSE. ;015. -INVALID DIC 

DIR SDRRUN.IL.SRSTCL :017.-RUN TASK 

DIR .FALSE. ;019. -INVALID DIC 



.IF DF ASSTRPIPt$LAS»PttSRr 

DIR SDRRRA,2. ;21. -SETUP FOR RECEIVE BY REFERENCE AST 

.IFF 



•••• I 10 •*•• 



ORDSP MACRO M1108 U-DEC-77 19:55 PAGE 2-3 

172 00013A 

173 

17A 

]n 

177 00013A 

178 OOOUO 

179 OOOUA 

180 000150 

181 000150 

182 0001 5A 

183 000160 

184 00016A 

185 000164 

186 000170 

187 000174 

188 000200 

189 000204 

190 000210 

191 000214 

192 000220 
199 



202 

203 0002^4 

204 000224 

205 000224 
206 

)7 




218 

219 000230 






DIR 
.ENDC 



DIR 
DIR 
DIR 
DIR 
DIR 
DIR 
DIR 
DIR 
DIR 
DIR 
DIR 
DIR 
DIR 
DIR 
DIR 
DIR 



DIR 
DIR 
DIR 

.IFF 

DIR 
DIR 
DIR 

.ENDC 



DIR 



.FALSE. 



SDRMKT.S. 

tDRCSR.3. 

SDRCNT.I. 

.FALSE. 

$DRCEF.2. 

SDRSE^2. 

$DRDSE,1. 

.FALSE. 

SDRRAF.2. 

SDRWFS,2. 

tDRWFL.3. 

SDRSPN.1. 

SDRRES,3. 

SDRWSE.1. 

SDREXT.1. 

IDREIF.2. 



;021. -INVALID DIC 



.CEFNCL ;023.-»WRf( TIME 

,<SRSTCL.HUPCHIt;> ;025. -CANCEL SCHEDULE REQUESTS 

:027. -CANCEL NARK TIME REQUESTS 

;029. -INVALID DIC 
,<CEFNCL.CEFNMT> ;031. -CLEAR EVENT FLAG 
,<CEFNCL.CEFNMT> ;033.-SET EVENT FLAG 

:035. -DECLARE SIGNIFICANT EVENT 

.037. -INVALID DIC 

; 039. -RE AD ALL EVENT FLAGS 
,<CEFNCL,CEFNnT> ;041.-yAITF0R SINGLE EVENT FLAG 

;043.-«AITF0R LOGICAL 'OR' OF EVENT FLAGS 

:045. -SUSPEND EXECUTION 
.SRSTCL :047. -RESUME TASK EXECUTION ; TM088 

;049.-«AITFOR SIGNIFICANT EVENT ;**-1 

;051.-TASK EXIT 
,<CEFNrL.CEFNMT> ;053.-EXIT IF 



.IF DF PStLAS 



»DRCRR,2..ACHK0B ;055. -CREATE REr,l0N 
IDRATR.2..ACHKDB .057. -ATTACH RLoION 
tDRDTR.2.,ACHKD8 ;059. -DETACH REGION 



.FALSE. 
.FALSE. 
.FALSE. 



»DRGTP.2. 



.IF DF GWTTK 

DIR tDRGTK.2. 

.IFF 

DIR .FALSE. 

.ENDC 

.IF DF 611 TPP 

DIR tDRGPP.4. 
.IFF 



;055. -INVALID DIC 
;057. -INVALID DIC 
;059. -INVALID DIC 



; 061. -GET TIME PARAMETERS 



; 063. -GET TASK PARAMETERS 



;063.-GET TASK PARAMETERS 



;065.-6ET PARTITION PARAMETERS 



•••• J 10 •••• 



OROSP MACRO mi 08 U-OEC-77 19:55 PAGE 2-4 



229 

230 000230 

231 

232 

233 

23A 

235 000230 

236 

237 

238 

239 

2A0 

2A1 

2A2 

2A3 

2A^ 000230 

2A5 

246 

247 

248 

249 

250 

251 

252 

253 

254 

255 000230 

256 

257 

258 

259 000230 

260 

261 

262 

263 

264 

265 

266 

267 000230 

268 

269 

270 

271 

272 

273 

274 

275 000230 

276 

277 

278 

279 

280 000230 

281 



?85 



DIR .FALSE. 
.ENDC 

DIR .FALSE. 



;065.-GET PARTITION PARAMETERS 



;067. -INVALID DIC 



.IF DF PSSLAStPSSSRF 

DIR $DRSRF.5..SRSTCL ;069.-SEND BY REFERENCE 

.IFF 

DIR .FALSE. ;069. -INVALID DIC 

.ENDC 

.IF DF RSSSND 

DIR $DRSND.5.,SRSTCL ;071.-SEND DATA TO TASK 

.IFF 



DIR .FALSE. 

.IFTF 

DIR .FALSE. 

.IFT 

DIR tDRREC.4. 

.IFF 

DIR .FALSE. 

.IFT 

DIR $DRRfc'C,4. 

.IFF 

DIR .FALSE. 

.ENDC 

DIR .FALSE. 



; 071. -SEND DATA TO TASK 

;073. -INVALID DIC 

; 075. -RECEIVE DATA FROM TASK 

; 075. -RECEIVE DATA FROM TASK 

; 077. -RECEIVE DATA FROM TASK OR EXIT 

;077. -RECEIVE DATA FROM TASK OR EXIT 

;079. -INVALID DIC 



.IF DF PSSLASIPSSSRF 

DIR tDRRRF,2.,AChKDB ,081 .-RECEIVE BY REFERENCE 



•••• K 10 •♦•• 



ORDSP MACRO Ml 108 U-OEC-77 19:55 



286 

287 

288 

289 000230 

290 

291 

292 

293 

29A 000230 

295 0OO23A 

2% 00O23A 

297 

298 

299 

300 

301 

302 

303 

304 

305 00023A 

306 

307 

308 

309 

310 00023A 

311 00023A 
312 

313 
3U 
315 
316 
317 
318 
319 
320 

321 00023A 

322 0002 3A 
323 

324 
325 
326 
327 
328 
329 
330 
331 
332 
333. 

334 000234 

335 000234 
336 

337 
338 
339 

340 J00234 

341 000240 
342 



PAGE 2-5 


.IFF 










DIR 


.FALSE. 




.•081. -INVALID DIC 




.ENDC 










DIR 
DIR 
DIR 


SDRAB0.3. 

.FALSE. 

.FALSE. 


.<SRSTCL,MUPCHK> ;083. -ABORT TASK 
;085. -INVALID DIC 
;087. -INVALID DIC 




.IF DF 


DSSVNMtESSXPRtMSSMGE 




DIR 


SDREXP.3. 




; 089. -EXTEND PARTITION 




.IFF 










DIR 


.FALSE. 




;089. -INVALID DIC 




.ENDC 










DIR 
DIR 


.FALSE. 
.FALSE. 




;091. -INVALID DIC 
;093. -INVALID DIC 




.IF DF 


CSSCKPtDSSISK 






DIR 
DIR 


SDRDCP.I. 
SDRECP.1. 




; 095. -DISABLE CHECKPOINTING 
;097. -ENABLE CHECKPOINTING 




.IFF 










DIR 
DIR 


.FALSE. 
.FALSE. 




; 095. -DISABLE CHECKPOINTING 
;097. -ENABLE CHECKPOINTING 




.ENDC 









.IF DF ASSTRP 



DIR 
DIR 

• IFF 

DIR 
DIR 

.ENDC 



DIR 
DIR 



SDRDARJ. 
SDREARJ. 



.FALSE. 
.FALSE. 



IDRSDV.3. 
tDRSTV,3. 



;099. -DISABLE AST RECOGNITION 
;101. -ENABLE AST RECOGNITION 



; 099. -DISABLE AST RECOGNITION 
; 101. -ENABLE AST RECOGNITION 



;103. -SPECIFY ODT SST VECTOR 
;105. -SPECIFY TASK SST VECTOR 



**** L 10 **** 



ORDSP MACRO M1108 U-OEC-77 19:55 PAGE 2-6 



3A5 

3AA 

3A5 

3A6 

3A7 

3A!^ 

3A9 

550 0002A4 

351 

352 

353 

35A 

355 

356 

357 

358 

359 

360 

361 0002AA 

362 

363 

36A 

365 

366 

367 

368 

369 

370 

371 

372 000244 

373 

37A 

375 

376 

377 

378 

379 

380 

381 

382 

383 000244 

384 

SI 

387 
388 

389 

390 

391 

392 

593 

594 000244 

595 

596 

397 

598 

399 



.IF DF ASSTRPMSSSND 

DIR SDRRCV,2. 

.IFF 

DIR .FALSE. 

.ENDC 

.IF DF ASSTRPtPSSRFL 

DIR $DRPUT,2. 

.IFF 

DIR .FALSE. 

.ENDC 

.IF DF A$$TRPftF$$LPP 

DIR SDRFEX,2. 

.IFF 

DIR .FALSE. 

.ENDC 

.IF DF PSSLASftPSSGMX 

DIH SDRGMX,2. 

.IFF 

DIR .FALSE. 

.ENDC 

.IF DF AMTRP 

DIR SDRATXJ. 

.IFF 

DIR .FALSE. 

.ENDC 

.IF DF P$$LAS 



; 107. -SETUP FOR RECEIVE AST 



; 107. -SETUP FOR RECEIVE AST 



; 109. -SETUP FOR POWER UP AST 



; 109. -SETUP FOR POWER UP AST 



;111. -SETUP FOR FLOATING POINT AST 



;111. -SETUP FOR FLOATING POINT AST 



;113.-6ET MAPPING CONTEXT 



;113. -INVALID DlC 



;11t..-AST TRAP tXIT 
;1!5.-AST TRAP EXIT 



**•• M )Q •••• 



I 



DROSP MACRO MHOS U-OEC-77 19:55 PAGE 2-7 



400 
A01 
402 
403 
404 
405 
406 
407 

408 000244 

409 000244 

410 000244 

411 000244 
412 

413 

414 

415 

416 

417 

418 

419 

420 

421 

422 000244 

423 

424 

425 

426 

427 

428 

429 

430 

431 

432 

433 000244 

434 

435 

436 

437 

438 

439 

440 

441 

442 

443 

444 

445 

446 

447 

448 

449 

450 

451 

452 

453 

454 

455 

456 



DIR 
DIR 
DIR 
DIR 

.IFF 

DIR 
DIR 
DIR 
DIR 

.ENDC 



SDRCRU,2.,ACHKDB ;117. -CREATE ADDRESS WINDOW 
SDRELW,2.,ACHKDB :119. -ELIMINATE ADDRESS WINDOW 
$DRnAP,2.,ACHKDB ; 121. -NAP ADDRESS WINDOW 
SDRUNM.2.,ACHKDB ;123.-UNMAP ADDRESS WINDOW 



.FALSE. 
.FALSE. 
.FALSE. 
.FALSE. 



.IF DF 6$$TSS 

DIR SDRGSS.I. 

.IFF 

DIR .FALSE. 

.ENDC 

.IF DF MSSCRX 

DIR SDRGCL,41. 

.IFF 

DIR .FALSE. 

.ENDC 

.IF DF CMINT 
DIR $DRCIN,7. 
.ENDC 



117. -INVALID Die 

119. -INVALID Die 

121. -INVALID Die 

123. -INVALID Die 



.•125. -GET SENSE SWITCHES 



; 125. -GET SENSE SWITCHES 



; 127. -GET NCR COMMAND LINE 



; 127. -GET MCR COMMAND LINE 



; 129. -CONNECT TO INTERRUPT 



TM088 
TM088 
TM088 
TM088 
TM088 
TM088 
TM088 



••-ITRTRP-rRAP TrtAP 

THIS ROUTINE IS TRAPPED TO WHEN A TRAP INSTRUCTION IS bXECUTED. IF THE 

STACK DEPTH IS ZERO, THEN A DIRECTIVE STATUS IS TO BE RETURNED. ELSE 

CONTROL IS TRANSFERED TO THE EKT/TRAP SST HANDLING ROUTINE. 



INPUTS 



2<SP)=PS WORD PUSHED BY TRAP INSTRUCTION. 
0(SP)=PC WORD PUSHED BY TRAP INSTRUCTION. 



••»* N 10 **** 



A57 
458 
459 
460 
461 
462 
463 

464 000244 

465 000250 

466 000252 

467 000256 
468 

469 

470 

471 

472 

473 

474 

475 

476 

477 000260 

478 

479 

480 

481 

482 000264 

483 000270 

484 000272 

485 000274 

486 000300 



005767 
001014 

011600 



012706 



116000 
010046 
100116 
005277 
000513 



OEC-77 19:55 


PAGE 


2-8 










; 


OUTPUTS: 








• 
i 
; 




IF THE STACK DEPTH IS ZERO, THEN A DIRECTIVE STATUS IS RETURNED. 
ELSE CONTROL IS TRANSFERtD TO THE EMT/TRAP SST HANDLING ROUTINE. 


OOOOOOG 


STRTRP: 


.ENABL 
:TST 
BNE 
MTPS 
MOV 


LSS 

SSTKDP 

SEMTRP 

»0 

(SP).RO 




•;;STACK DEPTH ZERO? 

.■;IF NE NO 
-;:ALLOW INTERRUPTS 

GET ADDRESS PLUS 2 OF TRAP INSTRUCTION 








.IF DF 


MSSM6E 










BIS 

MOV 


«PMODE,PS 
#$STACK-22..SP 


;SET PREVIOUS MODE TO USER 
: RELOAD EXEC STACK POINTE^^ 








.IFF 






1777666 






MOV 
.ENDC 


#$STACK-12.SP 


.•RELOAD EXEC STACK POINTER 


177776 
177500 






MOVB 

MOV 

BPL 

INC 

BR 


-2(R0).R0 
RO. -(SP) 
60$ 

ausRPS 

60S 




PICKUP DIRECTIVE STATUS 
SAVE DIRECTIVE STATUS 
IF PL OKAV AS IS 
SET CARRY IN USER PS WORD 



••-SEMTRP-EMT TRAP 

THIS ROUTINE IS TRAPPED TO WHEN AN EMT INSTRUCTION IS EXECUTED. IF THE 
STACK DEPTH IS NOT ^l. THEN THE SYSTEM IS CRASHED. ELSE A TEST IS 
MADE TO SEE IF THE EMT INSTRilCTION HAD A CODE OF 377. IF NOT, THEN 
CONTROL IS TRANSFERED TO THE EMT/TRAP SST HANDLING ROUTINE. ELSE THE 
APPROPRIATE DIRECTIVE IS EXECUTED. 

INPUTS: 



I 2(SP)«PS WORD PUSHED BY EMT INSTRUCTION. 

I OlSP)«PC WORD PUSHED BY EMT INSTRUCTION. 



OUTPUTS: 



508 

509 000302 

510 QQQ306 

511 000312 

512 Q0Q314 

513 000320 



5767 
1130 
-17703 
022323 



OOOOOOG 
OOOOOOG 



I 
I 
I 

f 

SEMTRP: 



IF THE STACK DEPTH IS NOT ♦I. THEN THE SYSTEM IS CRASHED. ELSE 
CONTROL IS GIVEN TO THE EMT/TRAP SST ROUTINE OR A DIRECTIVE ROUTINE 
DEPENDENT ON WHETHER THE EMT HAD A CODE OF 377. 



DIRSVS 
TST 
BNE 
MOV 

CMP 



SSTKDP 

aSHEADR.R3 
(R3)t.(R3)» 



;:SAVE REGISTERS AND SET PRIORITY 
W(RE WE AT STACK DEPTH «1? 
IF NE NO-CRASH SYSTEM 
GET SAVED STACK POINTER 
POINT ro USER PC WORD 



•tt* B 11 *••• 



«t**« B 11 ***• 



OROSP MACRO Ml 108 U 


-OEC-77 19:55 


PAGE 2-9 








5U 000322 


012305 




MOV 


(R3)*.R5 


;GET ADDRESS OF EMT PLUS 2 




515 














516 














517 






• IF OF 


MSSMGE 






518 














519 






MFPl 


-<R5) 


;6ET DIRECTIVE WORD 




520 






CMP 


#104377. (SP) 


;D1RECTIVE EMT? 




521 






BNE 


80$ 


;IF NE NO 




522 






MOV 


#1,(SP) 


;SET SUCCESSFUL DIRECTIVE STATUS 




523 














524 






.IFF 








525 














526 00032A 


022745 


104377 


CMP 


#104377. -(R5) 


;OIRECTIVE EMT? 




527 000330 


001122 




BNE 


SOS 


;IF NE NO 




528 000332 


012746 


000001 


MOV 


#1.-(SP) 


;SET SUCCESSFUL DIRECTIVE STATUS 




529 














530 






.IFTF 








531 














532 000336 


012705 


000000' 


MOV 


#USRPS,R5 


; POINT TO LOCAL DATA 




533 000342 


010325 




MOV 


R3,(R5)+ 


;SAVE ADDRESS OF USER PS 




534 000344 


041623 




BIC 


(SP).(R3)+ 


■CLEAR CARRY IN USER PS WORD 




535 000346 


005015 




CLR 


(R5) 


■INDICATE NO BYTES 




536 














537 






.IFT 








538 














539 






MFPI 


SP 


■GET USER STACK POINTER 




540 






MOV 


(SP)*.R3 






541 






SDRLMI : :MFPI 


(R3) 


•GET FIRST WORD ON USER STACK 




542 






BIT 


#1,(SP) 


■DPB ON STACK? 




543 






BNE 


SDRLM2 


•IF NE YES 




544 






MOV 


#2.(R5) 


■INDICATE DPB POINTED TO BY STACK 




545 






MOV 


(SP).R3 


SET ADDRESS OF DPB 




546 






MFPI 


a(SP)t 


GET FIRST WORD OF DPB 




547 






$DRLM2::M0V 


(SP)i.Rl 


PICK UP FIRST DPB WORD 




548 












■ TM088 


549 












• TM088 


550 






.IF OF 


CSSINT 




• TM088 


551 












• TM088 


552 






CLR 


RO 


EXTRACT OK CODE 


• TM088 


553 






BISB 


RI.RO 




TM088 


554 












TM088 


555 






.UF 






TM088 


556 












TM088 


557 






MOVB 


R1 .RO 


COPY Die CODE 




558 












TM088 


559 






.ENOC 






TM088 


560 












TM088 


561 












TM088 


til 






CLRB 


R1 


CLEAR Die BYTE 




563 
564 
565 






SWAB 


R1 


SWAP DPB SIZE TO LOW BYTE 








• IFF 








566 














\&ZW2 


031615 
001003 




BIT 
BNE 


(SP),(R3) 
10$ 


DPB ON STACK? 
IF NE YES 




569 000354 


011303 




MOV 


(R3),R3 


GET ADDRESS OF DPB 




570 000356 


012715 


000002 


MOV 


#2.(R5) 


INDICATE DPB POINTED TO BY STACK 




*••• c 11 *•«* 



DROSP MACRO M1108 U-DEC-77 19:55 PAGE 2-10 



wwww t I I w»«« 



571 

572 

573 

57A 

575 

576 

577 

578 

579 

580 

581 

582 

583 

58A 

585 

586 

587 000362 

588 

589 

590 

591 

592 00036A 

593 0C0366 
59A 

595 
5% 
597 

598 000372 

599 000374 

600 000376 

601 000400 

602 000402 
603 

604 

605 

606 

60> 

608 

609 

610 

611 

612 000404 

613 

614 

615 

,M6 

(^7 000406 

6 1? 000410 

619 000414 

620 000416 

621 000422 

622 000416 

623 QU0430 

624 000432 
625 

626 
627 



111300 



005001 

156301 000001 



10S: 



10S: 



006301 
010104 
005046 
006200 
103014 



100413 



005002 

156002 000004* 

001407 

062702 000102' 

120162 000002 

001002 

012216 

011204 



.IF OF AfSCHK 

CALL $ACHK2 
.ENDC 

.IF OF CSSINT 

CLR RO 

BISB (R3).R0 

.IFF 

MOVB (R3),R0 

.ENDC 



CLR 
BISB 

.ENDC 



ASL 
NOV 
CLR 
ASR 
BCC 



CMP 
BHI 

.IFF 

BMI 

.ENDC 



CLR 

BISB 

BEQ 

ADD 

CMPB 

BNE 

MOV 

MOV 



R1 
1(R3),R1 



R1 

R1,R4 

-ISP) 

RO 

35S 



,IF OF CSSINT 



R0,#129./2 
35$ 



35$ 



R2 

DSPMP(R0).R2 

35$ 

#DSPTBL-2.R2 

R1.2(R2) 

35i 

(R2)+.(SP) 

(R2),R4 



; ADDRESS CHECK FIRST DPS WORD 



; EXTRACT DIC CODE 



;PICK UP DIC CODE 



;PICIC UP DPfl SIZE 



; CONVERT TO BYTES TO REMOVE AT EXIT 

;C0PY SIZE 

.•ASSUME 'LLEGAl. DIC OR DPS SIZE 

;DIVIDE CODE BY 2 

;1F CC ILLEGAL DIC CODE 



.-LEGAL DIC CODE? 
;IF HI NO 



;IF MI CODE > 63. 



MAP TO DIRECTIVE DISPATCH TABLE 

IF EQ ILLEGAL DIRECTIVE 

POINT TO PROPER TABLE ENTRY 

DPB SIZE MATCH? 

IF NE NO 

GET ADDRESS OF DIRECTIVE ROUTINE 

PICK UP DIRECTIVE SIZE AND MASK BYTE 



TM088 
TM088 
TM088 
TM088 
TM088 
TM088 
TM088 

TM088 
TM088 
TM088 
TM088 



TM088 
TM088 
TM088 
TM088 
TM088 
TM088 
TM088 
TM088 
TM088 

TM088 
TM088 
TM088 
TM088 



.IF DF P$$LAStM$$MGE 



*••* D 11 ••«• 



DROSP MACRO M1108 U-DEC-77 19:55 PAGE 2-11 



628 

629 

630 

631 

632 

633 

63A 

635 

636 

637 000A3A 

638 

639 

6A0 

6A1 

642 

6A3 

6AA 

6A5 

6A6 

6A7 000A3A 

6A8 000436 

649 000440 

650 000442 

651 000444 

652 000446 

653 000450 

654 000452 

655 000456 
656 

657 
658 
659 
660 
661 
662 
663 
664 
665 
666 
667 

668 000460 

669 000462 

670 000466 

671 000470 

672 000472 

673 000474 
674 

675 
676 
677 
678 
679 



J1 
682 

683 
684 



BPL 
SDPLMI : :MFP1 
SDPLM2::M0V 

MOV 



35ti 



005723 

005715 

001001 

110415 

105004 

005716 

001461 

016705 OOOOOOG 

006304 



S6li 



mt 



100003 

103012 
006304 
001410 
100«.50 



40lt 



.ENDC 



• IF DF 

CALL 

.ENOC 



TST 

TST 

BNE 

MOVB 

CLRB 

TST 



.ENDC 



CALL 
BCC 

i 



35S 

2(R3) 

(SP)*.R3 

#8.*2,R1 



IF PL NOT A PLAS DIRECTIVE 

PICK UP POINTER TO DEFINITION BLOCK 

PICK UP SIZE OF DEFINITION BLOCK 



.•REFERENCE LABEL 

ASSCHKiMSSMGE 

SACHKP : ADDRESS CHECK AND MAP DEFINITION BLOCK 



(R3)> 

(R5) 

36$ 

R4,(R5) 

R4 

<SP) 

90S 

STKTCB.R5 

R4 



SKIP OVER FIRST DPB WORD 

DPB ON STACK? 

IF NE NO 

SET NUMBER OF BYTES TO REMOVE AT EXIT 

CLEAR OUT SIZE BYTE 

LEGAL Die AND DPB SIZE? 

IF EQ NO 

PICK UP CURRENT TASK TCB 

CALL $C£FN OR PLAS DIRECTIVE? 



.IF DF PSSLAS 



371 ;IF CC NOT A PLAS DIRECTIVE 

-(R3) .-POINT BACK TO FIRST WORD OF BLOCK 

iVWS.CRW!WS.UNM!WS.ELW!WS.RRF,W.NSTS(R3) ;INIT OUTPUTS 
.•REFERENCE LABEL 



•«FN 

SOS 

R4 

SOS 

100S 



.IF DF ASSPRI'MSSMUP 



R5.R0 

(R3) 

46S 

.ENDC 



IF PL NO 

CONVERT EVENT FLAG NUMBER 

IF CC EVENT FLAG SPECIFIED 

EVENT FLAG REQUIRED? 

IF EQ NO 

IF MI EVENT FLAG WAS REQUIRED 



.•TASK NAME DEFAULT TO CURRENT TASK? 

;IF PL NO 

.-PICK UP CURRENT TASK TCB 

;TASK NAME SPECIFIED? 

;IF EQ NO 



**** E 11 ***• 



DRDSP MACRO M1108 U-OEC-77 19:55 PAGE 2-12 



685 
686 

687 000A76 

688 000502 

689 000504 
690 

691 
692 
693 
694 
695 
696 
697 
698 
699 
700 
701 
702 
703 
70A 
705 

706 000506 

707 000510 

708 0005U 

709 000516 

710 000522 
711 

712 

713 

r^i, 

715 

716 

717 

718 

719 

720 

721 

722 

723 000526 

72*, 000530 

725 

726 

727 

728 

729 

730 

731 

732 

733 

734 

735 

736 000530 

737 000534 

738 000540 

739 000542 

740 000544 

741 000550 



103446 
022323 



45$: CALL SSRSTD 

BCS 110$ 

46$: CHP (R3)*.(R3)* 



M$$nup 



SEARCH STD FOR TASK NAME 
IF CS NAME NOT FOUND 
ADVANCE PAST TASK NAME 




R4 .-PERFORM MULTI-USER PROTECTION CHECK? 

47$ ;IF PL NO 

#T3.PRV,T.ST3(R5) .-ISSUING TASK PRIVILEGED? 
47$ ;IF NE YES 

#T3.SLV,T.ST3(R0) .-TARGET TASK A SLAVE TASK? 
120$ .-IF NE YES, DON'T ALLOW 

T.UCB(R5),T.UCB(R0) .-CURRENT AND TARGET TASK UCBS MATCH? 
120$ ;IF NE NO 



010001 

062701 000032 
010502 

062702 000034 
016704 OOOOOOG 



47$: MOV 
ADD 

50$: MOV 
ADD 



R0,R1 

#T.STAT,R1 

R5,R2 

#T.ST2.R2 

$HEADR,R4 



COPY TCB ADDRESS 

POINT TO TASK STATUS WORD 

SET POINTER TO SECOND TASK STATUS WORD 

POINT TO CURRENT TASK HEADER 



CALL DIRECTIVE ROUTINE WITH THE FOLLOWING ARGUMENTS: 

R5sADDRESS OF THE TCB OF THE CURRENT TASK. 

R4«ADDRESS OF THE HEADER OF THE CURRENT TASK. 

R3«ADDRESS OF THE NEXT WORD IN THE DIRECTIVE DPB. 

R2sADDRESS OF THE SECOND TASK STATUS WORD OF THE CURRENT TASK. 

RI'DEPENDENT ON DIRECTIVE. 

RO=DEPENDENT ON DIRECTIVE. 



60$: 



CALL a(SP)^ 



.IF DF M$$MGE 



012677 OOOOOOG 
016700 OOOOOOG 
001414 
011000 

062700 000010 
010001 



aVH.DSW 

SP 

BTRMV.(SP) 



(sp)sa.DSw 

$HEADR.R0 
65$ 

(R0),R0 



«8.,R0 
RO. 



R1 



;CALL DIRECTIVE ROUTINE 
:REF LABEL 



;SET DIRECTIVE STATUS WORD 
.-GET USER STACK POINTER 
.•REMOVE BYTES FROM USER STACK 
.•RESTORE USER STACK POINTER 



SET DIRECTIVE STATUS WORD 
GET ADDRESS OF TASK HEADER 
IF EO TASK TERMINATED 
GET TASK STACK POINTER 
POINT TO FIRST STACK WORD 
COPY ADDRESS 



*••• F 11 ***• 



OROSP MACRO mi 08 U-DEC-77 19:55 PAGE 2-13 



7A2 000552 

7A3 000556 

7AA 000560 

7A5 000562 

7A6 00056A 

7A7 000566 

7A8 

7A9 

750 

751 

752 

753 

75A 000572 

755 

756 

757 

758 

759 000572 

760 

761 

762 

763 

76A 

765 00057A 

766 

767 

768 

769 

770 

771 000576 

772 

773 

77A 

775 

776 

777 

778 

779 

780 

781 

782 

783 

78A 000576 

785 

786 

787 

788 

789 000602 

790 00060A 

791 000610 
792 

793 

79A 

795 

796 

797 0006U 

798 



066701 17722A 

01A0A1 

01A0A1 

01A0A1 

01A0A1 

010177 OOOOOOG 



ADD 
MOV 
MOV 
MOV 
MOV 
MOV 

.ENDC 



BTRMV.R1 

-(RO).-(RI) 

-{RO).-(RI) 

-(RO).-(RI) 

-(RO).-(RI) 

R1 .aSHEADR 



POINT TO NEW TOP Of USER STACK 

MOVE RETURN PS WORD 

MOVE RETURN PC WORD 

MOVE SAVED R5 

MOVE SAVED RA 

SET NEW STACK POINTER 



SDRATP: 



.IF NDF ASSPRI 



.ENDC 



;NOP ALTER PRIOaiTY 



65S: RETURN ;EXIT FROM TRAP 

SYSTEM CRASH - EMT/TRAP EXECUTED AT STACK DEPTH OTHER THAN ♦! 
70S: CRASH 



EMT/TRAP SST ROUTINE TRANSFER 
SOS: 

.IF DF MSSMGE 



021527 10A376 



001002 

000167 OOOOOOG 

000167 OOOOOOG 



MOV 
MOV 
TST 
BEQ 
CMP 

.Iff 

CMP 
.ENDC 



SHEADR,R5 

H.WND(R5).R5 

W.BLVR«2(R5) 

85S 

(SP),#10A376 



;REF LABEL 



POINT TO CURRENT TASK HEADER 
POINT TO NUMBER OF WINDOW BLOCKS 
CURRENT TASK MAPPED TO EXEC? 
IF EQ NO 
IS THIS A CALL TO SSWSTK? 



(R5).#10A376 ;1S THIS A CALL TO SSWSTK? 



BNE 85S 

JMP SSWSTK 
85S: JMP SEMSST 



ILLEGAL DIRECTIVE 
90S: DRSTS D.RS99 



IF NE NO 

PROCESS CALL TO SSWSTK 

PROCESS SST FAULT 



.-SET DIRECTIVE STATUS 



**** G 11 •**• 



DROSP MACRO mi08 U-DEC-77 19:55 PAGE 2-}^ 



100 

801 

802 

803 000616 

804 



^ 



808 

809 000620 

810 

111 



000001 



REQUIRED EVENT FLAG NUMBER NOT SPECIFIED 
100$: DRSTS D.RS97 ;SET DIRECTIVE STATUS 

SPECIFIED TASK NAME NOT FOUND IN TASK DIRECTORY 
110$: DRSTS D.RS2 ;SET DIRECTIVE STATUS 

PRIVILEGE VIOLATION 



120$: 



• IF DF 


M$$MUP 


DRSTS 


D.RS16 


.ENDC 




.DSABL 


LS8 


.END 





.-SET DIRECTIVE STATUS 



•••• H 11 •**• 



DROSP 


MACRO mi 08 U-DEC-77 


19:55 


SYMBOL 


TABLE 






ACHKDe= 


000200 


H.OOVA 


000022 


BTRMV 


000002R 


H.ODVL 


000024 


CEFNCL= 


000100 


H.OVLY 


000054 


CEFNHT= 


000040 


H.PFVA 


000032 


CSSORE^ 


000400 


H.RCVA 


000036 


OFCTSKs 


000020 


H.RRVA 


000062 


DSPfK - 


000000 


H.SPRI 


000060 


DSPHP 


OOOOOAR 


H.TKVA 


000026 


DSPNX = 


000U2 


H.TKVL 


000030 


DSPSZ = 


000006 


H.VEXT 


000056 


OSPTBL 


0001 04R 


H.lfMD 


000044 


D.RS2 = 


•♦•♦*♦ GX 


KtSCNT- 


177546 


D.RS97= 


*•♦*♦* GX 


K$SCSR= 


177546 


D.RS99= 


•♦**•♦ GX 


KS$IEN= 


000115 


FE.CAL= 


000040 


K$$LDC= 


000001 


FE.CEX= 


020000 


ICS»TPS= 


000074 


FE.DRV= 


000010 


MPAR = 


172100 


FE.EXP= 000200 


MPCSR = 


177746 


FE.EXT= 


000001 


MUPCHKr 


000010 


FE.EXV= 


000004 


nSSCRB- 


000124 


FE.LSI= 


000400 


N 


000002 


FE.«UP= 000002 


OFFST = 


000100 


FE.MXT* 


040000 


PIRQ = 


}77772 


FE.NLG= 


100000 


PRO = 


000000 


FE.PKT= 


000100 


PR1 = 


000040 


FE.PLA= 


000020 


PR4 = 


000200 


M$«RTZ= 


000074 


PR5 = 


000240 


H.CSP 


000000 


PR6 = 


000300 


H.CUIC 


000010 


PR7 = 


000340 


H.DSW 


000046 


PS 


177776 


H.OUIC 


000012 


RS$F11« 


000001 


H.EFLM 


000004 


R»»JPO« 


000000 


H.EFSV 


OOvXKO 


R»$JP1* 


000001 


H.FCS 


000050 


RtSJSIs 


000001 


H.FORT 


000052 


RSSK11:: 


000001 


H.FPSA 


000042 


RSSPIU 


000001 


H.FPVA 


000034 


RSSXils 


000001 


H.GARO 


000072 


RSSIIMs 000000 


H.HDLN 


000002 


RttllSr 


000000 


H.IPC 


000016 


SRSTCL» 


000004 


H.IPS 


000014 


SWR s 


177570 


H.ISP 


000020 


SSSECC:: 


000000 


H.LUN 


000076 


SSSVSZs 


001000 


H.NLUN 


000074 


TPS s 


177564 


H.m. 


000061 






. ABS. 


000102 000 
000622 001 






ERRORS DETECTED: 







PAGE 2-15 



TS.BLK= 


170700 


T2.FX0= 


TS.CKP= 


000200 


T2.HLT= 


TS.CKR= 


000100 


T2.SPN= 


TS.EXE= 


100000 


T2.STP= 


TS.«SG= 


020000 


T2.TI0= 


TS.NRP= 


010000 


T2.WFR= 


TS.OUT= 


000400 


T3.ACP= 


TS.RDN= 


040000 


T3.CAL= 


TS.RUN= 


004000 


T3.CLI= 


T»$A11= 


000001 


T3.MCR= 


T$$C11=: 


000001 


T3.NET= 


TS$J16= 


000001 


T3.NSD= 


TSSKMG^ 


000000 


T3.PM0= 


TS$M11= 


000001 


T3.PRV= 


T.ACTL 


000052 


T3.REM= 


T.ASTL 


000016 


T3.R0V= 


T.ATT 


000054 


T3.RST= 


T.CPCB 


000004 


T3.SLV= 


T.DPRI 


000040 


USRPS 


T.EFL6 


000022 


VSSCTRr 


T.IOC 


000003 


yS.CRWs 


T.LBN 


000041 


WS.DEL= 


T.LDV 


000044 


WS.ELy= 


T.LNK 


000000 


WS.EXT= 


T.MXSZ 


000050 


WS.MAP= 


T.NAM 


000006 


WS.RCX= 


T.OFF 


000060 


WS.RED- 


T.PC8 


000046 


ys.RRF= 


T.PRI 


000002 


US.UNM> 


T.RCVL 


000012 


US.WRTs 


T.RRFL 


000064 


WS.64B= 


T.SRCT 


000063 


y.BATT 


T.STAT 


000032 


W.BFPD 


T.ST2 


000034 


W.BHVR 


T.ST3 


000036 


W.BLGH 


T.TCBL 


000030 


y.BLPD 


T.UCB 


000026 


y.BLVR 


T2.AB0> 


000100 


U.BNPD 


T2.AST« 


100000 


y.BOFF 


T2.nFX= 


004000 


y.BPCB 


T2.CAf= 


000400 


U.BSIZ 


T2.CHt(= 


020000 


y.NAPRr 


T2.CICDr 


010000 


y.NBAS= 


T2.DST= 


040000 


M.NID = 



VIRTUAL MEMORY USED: 4065 WORDS ( 16 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:37 

C41,20]DRDSP.SY0:r41.30]DRDSP/-SP=C1.1]EXEMC/ML.[41J0JRSXHC.C1M0.10RDSP 



002000 

000200 

000004 

000020 

001000 

000001 

100000 

000100 

001000 

004000 

000020 

000200 

040000 

010000 

020000 

000040 

000400 

002000 

OOOOOOR 

000400 

100000 

000010 

020000 

000004 

000200 

000100 

000001 

010000 

040000 

000002 

000400 

000006 

000014 

000004 

000020 

000016 

000002 

000015 

000012 

000000 

0D0010 

000001 

000002 

000000 



W.NLEN= 000012 
W.NLGH:: 000020 
W.NOFF= OOOOiO 
W.NRID= 000006 
W.NSIZ= 000004 
W.NSRB= 000016 
W.NSrS= 000014 
fCEFN = •**♦*• GX 
SDIRSV: •*•••* GX 
SDRABO= ****** GX 
$DRASG= ****** GX 
SDRATP 000572RG 
$DRCEF= ****** GX 
SDRCMTs ****** GX 
SDRCSR= ****** GX 
$DRDSE= ****** GX 
SDREIF= ****** GX 
$OREXT= ****** GX 
$DRGLI= ****** GX 
$DRGTP= ****** GX 
$DRMKT= ****** GX 
SDRQIO= ****** GX 
SDRRAF= ****** GX 
$DRREfl= ****** GX 
$DRRES= ****** GX 
$DRRUN= ****** GX 
$DRSDV= ****** GX 
SDRSEF= ****** GX 
$DRSPN= ****** GX 
$DRSTV= *♦•*•* 6X 
$DRWFL= ****** GX 
$DRWFS= ****** GX 
$DRWSE= ****** GX 
$EMSST= ****** GX 
SEMTRP 000302RG 
$HEADR= ****** GX 
$SRSTD= •**!** GX 
$STACK= *•*«•♦ GX 
$STKDP= **♦«'•» GX 
$SWSTK= **•»•* GX 
STKTCB= ****** GX 
$TRTRP 000244RG 
%%% = 000244R 
.DSW = ••••** GX 



•••* I }} •••• 




•tt* J )\ •••« 



DRABO MACRO Ml 108 U-OEC-77 19:55 PAGE 2 



s 



.TITLE OkNdO 
. I DENT /03/ 



COPrRIGHT (C) 197A. 1976 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERNS OF SUCH LICENSE. 

VERSION 03 

D. N. CUTLER 11-SEP-73 

MACRO LIBRARY CALLS 



8 

9 000000 



.MCALL ABODFS 
ABODFS 



;DEFINE TASK ABORT CODES 



**-SDRABO-AB0RT TASK 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO TERMINATE THE EXECUTION OF A 
SPECIFIED TASK. 



DPB FORMAT: 

WD. 00 
WD. 01 
WD. 02 

INPUTS: 



- DIC(83.).DPB SIZE(3.). 

- FIRST HALF OF TASK NAME. 

- SECOND HALF OF TASK NAME. 



000000 

52 000002 

53 OOOOOA 

54 000006 

55 000010 

56 000012 

57 000016 



005721 
100407 
105711 
100405 
010001 
012700 



ROcADDRESS OF THE TCB OF THE TASK TO TERMINATE. 

R1»ADDRESS OF THE TASK STATUS WORD OF THE TASK TO TERMINATE. 

R2sADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3«ADDRESS OF THE LAST WORD IN THE DPB«2. 

R4'ADDRESS OF THE HEADER OF THE CURRENT TASK. 

R5«A0DRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C«0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF *} IS RETURNED. 
C»1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RS?' IS RETURNED IF THE SPECIFIED 
TASK IS NOT ACTIVE. 



tDRABO: 



00002A 



TST 


(R1)t 




.•SPECIFIED TASK ACTIVE? 


BMI 


10S 




;IF MI NO 


TSTB 


(R1) 




;TASK ALREADY BEING TERMINATED? 


BMI 


10« 




.IF MI YES 


MOV 


R0.R1 




.•SET TCB ADDRESS OF TASK TO ABORT 


MOV 


#S.CABO.R0 




;SET REASON FOR ABORT 


CALLR 


lABTSK 




.-ABORT TASK 




•••• K 


11 


••«« 



DRABO MACRO Ml 108 U-OEC-77 19:55 PAGE 2-1 

58 000022 10$: DRSTS D.RS7 ;SET DIRECTIVE STATUS 

59 

60 000001 .END 



•**• I 11 t*** 



DRABO MACRO MHOS 
SVmOL TABLE 



U-DEC-77 19:55 PAGE 2-2 



CSSORE= 
0.RS7 = 
KStRTZ= 
KttCNT= 
KSSCSR= 
KStlENs 
K»«.DC= 
K»»TPS= 
MtSCRB= 
R»»F11= 



OOOAOO 
****** GX 

00007A 
1775A6 
1775A6 
000115 
000001 
00007A 
0001 2A 
000001 



RSSJPOs 
RS»JP1= 
RS$JS1= 
R»$K11= 
R$fP11= 
R»X11 = 
R$$11M= 
R$»11S= 
S$$ECC= 
SS$vSZ= 



000000 
000001 
000001 
000001 
000001 
000001 
000000 
000000 
000000 
001000 



S.CAB0= 
S.CAST= 
S.CBPT= 
S.CCRF= 
S.CE«T= 
S.CFLT= 
S.CILI= 
S.CIOT= 
S.CLRF= 
S.C0A0= 



00002A 
000022 
000004 
000030 
000012 
000016 
000010 
000006 
000026 
000000 



S.CSGF= 
S.CSST= 
S.CTRP= 
S.I0MG= 
S.PRTY= 
T$SA11= 
T»$C11= 
T$$J16= 
TSSKMG: 
TSSMII: 



000002 
000020 
OOOOU 
000032 
00003A 
000001 
000001 
000001 
000000 
000001 



T.NCRE= 
T.NCWF= 
T.NDM0= 
T.NONR= 
T.NDSE= 
T.NLDN= 
T.NLUP= 
V$$CTR= 
$ABTSK= 
SDRABO 



000006 
000004 
000010 
000000 
000002 
OOOOU 
000016 
000400 
****** GX 

OOOOOORG 



. ABS. 000000 000 

000024 001 

ERRORS DETECTED: 

VIRTUAL MEMORY USED: 1458 WORDS ( 6 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:08 
C41.20]DRABO.$Y0:C41,30]DRABO/-SP'[1,nEXEMC/ML,[41,10JRSXMC,C11J0]DRABO 

H 



•*** n ti **•* 



r-~7 




•••• N 11 •••♦ 



DRASG MACRO Ml 108 U-DEC-77 19:55 PAGE 2 



$ 

II 

1 



25 

26 000000 

27 



.TITLE DRASG 
.IDENT /05/ 



COPYRIGHT (C) 197«. 19/6 

D'GITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 05 

D. N. CUTLER 18-SEP-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
T. J. MILLER 

MODIFIED BY: 

MACRO LIBRARY CALLS 



.MCALL TCBDFS 
TCBDFS 



**-SDRASG-ASSI6N LUN 



.•DEFINE TASK CONTROL BLOCK OFFSETS 



THIS DIRECTIVE INSTRUCTS THE SYSTEM TO ASSIGN A DEVICE UNIT TO A 
LOGICAL UNIT NUMBER (LUN). 



DPS FORMAT: 

WO. 00 - 

WD. 01 - 

WD. 02 - 

WO. 03 - 



DIC(7.),DPB SIZE(A.). 
LUN TO BE ASSIGNED. 
NAME OF DEVICE TO BE ASSIGNED. 
- UNIT NUMBER OF DEVICE TO BE ASSIGNED. 



INPUTS: 



i 
I 

/ 
I 
t 
;- 



R2'ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3>ADDRESS OF THE LUN IN THE DPB. 

R4>ADDRESS OF THE HEADER OF THE CURRENT TASK. 

R5«ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C«0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 
DIRECTIVE STATUS OF O IS RETURNED. 
C«1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS Of 'D.RS90' IS RETURNED IF A FILE 

IS OPEN OR UNIT ATTACHED ON THE SPECIFIED LUN. 
DIRECTIVE STATUS OF •0.RS92' IS RETURNED IF DEVICE 
AND/OR UNIT IS INVALID. 



*••• B 12 **** 



**** B 12 **** 



ORASG MACRO Ml 108 H-DEC-77 19:55 PAGE 2-1 



58 

59 000000 

60 OOOOOA 

61 000006 

62 000010 

63 000012 

64 OOOOU 

65 000016 
66 

^7 



94 
95 

96 000020 

97 00002A 

98 000026 

99 000050 

100 00003A 

101 000036 

102 000042 

103 000044 

104 000050 

105 000052 

106 000056 

107 000062 

108 000066 

109 000072 

110 000076 

]\\ m]^ 

113 000106 

114 000110 



005711 
001054 
010046 
010104 
012302 
111300 



012703 
011303 
001445 
020263 
001373 
120063 
103770 
120065 
101365 
166300 
042700 
016301 



066301 
012603 
QQ1415 
020563 
001007 
010146 



SDRASG::CALL 


SMPLUN 


;HAP LUN TO DEVICE UCB 


TST 


(R1) 


;FILE ACCESSED ON LUN? 


BNE 


40S 


;IF NE YES 


MOV 


RO,-(SP) 


;SAVE ADDRESS OF JCB 


MOV 


R1.R4 


;SAVE ADDRESS OF SECOND LUM WORD 


MOV 


(R3)+,R2 


;GET NAME OF DEVICE 


MOVB 


(R3) ,R0 


;GET UNIT NUMBER 



13$: 



15$: 



OOOOOOG 

OOOOOOG 

OOOOOOG 

000001 G 

OOOOOOG 

177400 

OOOOOOG 

OOOOOOG 
OOOOOOG 



17$: 
20$: 



25$: 



.IF DF L$$ASG 



.IF DF M$$MUP 



BIT 
BNE 

.ENDC 



MOV 

MOV 

BEQ 

TSTB 

BEQ 

CMP 

BNE 

CMP 

BNE 

CMPB 

BNE 

MOV 

BR 

.ENDC 



MOV 

MOV 

BEQ 

CMP 

BNE 

CMPB 

BLO 

CMPB 

BHI 

SUB 

BIC 

MOV 

CALL 

ADD 

MOV 

BEQ 

CMP 

BNE 

MOV 



#T3.SLV. 
17$ 



T.ST3(R5) .-SLAVE TASK? 

;IF NE YES. BYPASS LOGICAL DEVICE TABLE 



#$L0GHD.R3 ;POINT TO LOGICAL ASSIGNMENT LIST 

(R3).R3 .-GET ADDRESS OF NEXT ENTRY 

17$ ;IF EQ END OF LIST 

L.TYPE(R3) ;SYSTEM WIDE ASSIGNMENT? 

15$ ;IF EQ YES 

L.UCB(R3).T.UCB(R5) :TI UCB ADDRESS MATCH? 



13$ 

R2.L.NAM(R3) 

13i 

R0.L.UNIT<R3) 

13i 

L.ASG(R3),R1 

25$ 



#$DEVHD..13 

(R3).R3 

50$ 

R2.D.NAM(R3} 

20$ 

R0.D.UNIT(R3) 

20i 

R0.D.UNIT*1(R3) 

20i 

D.UNIT(P3).R0 

#177400,R0 

D.UCBL(R3),R1 

$MUL 

D.UCB(R3).R1 

(SP)t,R3 

30$ 

R5.U.ATT(R3) 

27i 

RI.-(SP) 



;IF NE NO 

.•DEVICE NAME MATCH? 

:IF NE NO 

.-UNIT NUMBER MATCH? 

'IF NE NO 

•GET ASSIGNMENT UCB ADDRESS 

; FINISH IN COMMON CODE 



POINT TO PHYSICAL DEVICE TABLES 

GET ADDRESS OF NEXT DCB 

IF EQ END OF TABLES 

DEVICE NAME MATCH? 

IF NE NO 

UNIT GREATER THAN OR EQUAL TO LOW BOUNDRYl 

IF LO NO 

UNIT LESS THAN OR EQUAL TO HIGH BOUNDRY? 

IF HI NO 

CALCULATE RELATIVE UNIT NUMBER 

CLEAR EXCESS BITS 

GET LENGTH OF UCB IN BYTES 

CALCULATE NUMBER OF BYTES 

CALCULATE ADDRESS OF UCB 

WAS LUN PREVIOUSLY ASSIGNED? 

IF EQ NO 

UNIT ATTACHED TO CURRENT TASK? 

IF NE NO 

SAVE NEW ASSIGNMENT UCB ADDRESS 



*••• c 12 **** 



DRASG MACRO M1108 1A-0EC-77 19:55 PAGE 2-2 



*"** C 1Z *•♦• 



115 000112 

116 0001U 

117 000120 

118 000122 

119 0001 2A 

120 000126 

121 000130 

122 00013A 

123 000136 
12A OOOUO 
125 0001 A2 
126 

127 



010100 

012601 
02C003 
001005 
010305 
0127A6 
010UA 



000001 



OOOOOOG 





MOV 


RI.RO 




CALL 


SMPLND 




MOV 


(SP)*,R1 




CMP 


R0,R3 




BNE 


AOS 


27%: 


MOV 


R3.R5 




MOV 


#$IOKIL.-(SP) 


30»: 


MOV 
RETURN 


RI.-(RA) 


40$: 


ORSTS 


D.RS90 


50$: 


DRSTS 


D.RS92 



COPY UCB ADDRESS 

MAP TO REAL UCB ADDRESS 

RETRIEVE NEW ASSIGNMENT UCB ADDRESS 

NEW ASSIGNMENT TO SAME FINAL UCB? 

IF NE NO 

COPY OLD ASSIGNMENT UCB ADDRESS 

SET TO KILL I/O ON PREVIOUS ASSIGNMENT 

ASSIGN LUN TO NEW UNIT 

SET DIRECTIVE STATUS 
SET DIRECTIVE STATUS 



.END 



•••* D 12 **** 



V le 



DRASG MACRO MHOS 
SYMBOL TABir. 



U-DEC-77 19:55 PAGE 2-3 



CSSORE= 
D.NAM = 
D.RS90= 
D.RS92= 
D.UCB = 
D.UCBL= 
O.UNIT= 
HtSRTZ= 
KSSCNT= 
K»$CSR= 
KS$IEN= 
Kt$LDC= 
K»TPS= 
MttCRB= 
R»F11 = 
R»$JPO= 
R*»JP1= 
RStJS1= 
R»$IC11 = 



****** 



****** 



GX 



OOOAOO 

GX 
GX 
GX 
GX 

****** GX 

****** 

00007A 

1775A6 

1775A6 

000115 

000001 

00007A 

0001 2A 

000001 

000000 

000001 

000001 

000001 



R$$P11= 
R$tXl1= 
RS$11M= 
RSSIISr 
SS$ECC= 
S»»YSZ= 
TS.BLK= 
TS.CKP= 
TS.CKR= 
TS.EXE= 
TS.«SG= 
TS.NRP= 
TS.0UT= 

rs.RDN= 

TS.RUN= 
TMA11 = 
T$SC11= 
T$$J16= 
T$$KMG= 



000001 
000001 
000000 
000000 
000000 
001000 
170700 
000200 
000100 
100000 
020000 
010000 
GOOAOO 
OAOOOO 
OOAOOO 
000001 
000001 
000001 
000000 



T$$H11= 


000001 


T.ACTL 


000052 


T.ASTL 


000016 


T.ATT 


00005A 


T.CPCB 


OOOOOA 


T.DPRI 


OOOOAO 


T.EFLG 


000022 


T.IOC 


000003 


T.LBN 


0000A1 


T.LDV 


OOOOAA 


T.LNK 


000000 


T.MXSZ 


000050 


T.NAM 


000006 


T.OFF 


000060 


T.PCB 


0000A6 


T.PRI 


000002 


T.RCVL 


000012 


T.RRFL 


00006A 


T.SRCT 


000063 



T.STAT 

T.ST2 

T.ST3 

T.TCBL 

T.UCB 

T2.AB0: 

T2.AST= 

T2.BFX= 

T2.CAF= 

T2.CHIC= 

T2.CK0= 

T2.DST= 

T2.FXD= 

T2.HLT= 

T2.SPN= 

T2.STP= 

T2.T10= 

T2.WFR= 

T3.ACP= 



000032 
00003A 
000036 
000030 
000026 
000100 
100000 
OOAOOO 
OOOAOO 
020000 
010000 
OAOOOO 
002000 
000200 
OOOOOA 
000020 
001000 
000001 
100000 



000070 000 
0001 AA 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 2199 WORDS ( 9 PAGES) 
DYNAMIC MEMORY: 157AA WORDS ( 60 PAGES) 
ELAPSED TIME; 00:00:11 
CA1.2O]DRASG.SYO:CA1.30]DRASG/-SP=C1.1]EXEMC/ML.CA1.103RSXMC,C11.10]0RASG 



T3.CAL= 

T3.CLI= 

T3.MCR= 

T3.NET= 

T3.NSD= 

T3.PMD= 

T3.PRV= 

T3.REM= 

T3.R0V= 

T3.RST= 

T3.SLV= 

U.ATT = 

V$$CTR= 

$DEVHD= 

SDRASG 

SIOKIL:: 

$MPLND= 

$MPLUN= 

$MUL = 



000100 
001000 
OOAOOO 
000020 
000200 
OAOOOO 
010000 
020000 
OOOOAO 
OOOAOO 
002000 
****** GX 

OOOAOO 

****** GX 

OOOOOORG 

****** GX 
****** GX 
****** GX 
****** GX 



*•*• E 12 **** 




*•*• f )2 ••«« 



DRATX MACRO MIIOS U-OEC-77 19:56 PAGE 2 



1 

2 

3 

A 

5 

6 

7 

8 

9 
10 
11 
12 
13 
U 
15 
16 
17 
18 
19 
20 
21 
22 
23 
2A 
25 

26 000000 

27 000000 

28 000000 

29 000000 
30 

31 
32 
33 
3A 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 



•TITLE DRATX 
. I DENT /06/ 



COPYRIGHT (C) 1974. 1976 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 06 

D. N. CUTLER 31-AUG-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
T. J. MILLER 

MODIFIED BY: 

MACRO LIBRARY CALLS 

.MCALL ABODFS.HDRDFS.HWDDFS.TCBDFS 

ABODFS .-DEFINE TASK ABORT CODES 

HDRDFS .-DEFINE TASK HEADER OFFSETS 

HWDDFS ; DEFINE HARDWARE REGISTERS 

TCBDFS .-DEFINE TASK CONTROL BLOCK OFFSETS 

♦*-$DRATX-AST SERVICE EXIT 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO TERMINATE THE EXECUTION OF AN 
ASYNCHRONOUS SYSTEM TRAP SERVICE ROUTINE. IF ANOTHER AST IS QUEUED AND 
AST'S ARE NOT DISABLED. THEN THE NEXT AST IS EFFECTED IMMEDIATELY. 

DPS FORMAT: 

WO. 00 — DIC(115.).DPe SIZEd.). 

AT ISSUANCE THE TASK STACK CONTAINS: 

14(SP)=EVENT FLAG MASK WORD FOR FLAGS 1.-16. 

12(SP)xEVENT FLAG MASK WORD FOR FLAGS 17.-32. 

10(SP)<EVENT FLAG MASK WORD FOR FLAGS 33.-48. 

06(SP)=EVENT FLAG MASK WORD FOR FLAGS 49.-64. 

04(SP)=PRE AST TASK PS. 

02(SP)«PRE AST TASK PC. 

00(SP)<PRE AST TASK DIRECTIVE STATUS WORD. 



INPUTS: 



R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 
R3=AD0RESS OF THE LAST WORD IN THE DPB+2. 
R4«A00RESS OF THE HEADER OF THE CURRENT TASK. 
R5«A0DRESS OF THE TCB OF THE CURRENT TASK. 



**** 6 12 ***• 



DRATX MACRO Ml 108 1A-DEC-77 19:56 PAGE 2-1 



58 
59 
60 
61 
62 
63 
(A 
65 
66 
67 
68 
69 
70 
71 
72 
73 
7A 
75 
76 
77 
78 
79 



OUTPUTS: (DIRECTIVE STATUS AND PS WORD RETURNED TO TASK) 

C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF PRE AST STATE IS RETURNED. 
C=1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'O-RSSO' IS RETURNED IF THE DIRECTIVE 
WAS NOT EXECUTED FROM AN AST SERVICE ROUTINE. 

NOTE: IF AN ADDRESS CHECK FAILURE OCCURS WHILE REMOVING ARGU- 
MENTS FROM THE TASK STACK, THEN THE ISSUING TASK IS 
ABORTED. 



SDRATX: 



5S: 



.IF DF ASSTRP 



.IFTF 



.•DIRECTIVE EXECUTED FROM AST? 
;IF PL NO 

.•SHIFT AST SUSPEND AND WAITFOR BITS INTO 
#*C<T2.AST!T2.STP!T2.SPN!T2.WFR>.(SP) ;CLEAR EXTRA BITS 
.•CLEAR AST IN PROGRESS FLAG 
.•RESTORE PRE AST STATE 



;WAS TASK STOPPED? 

:IF EQ NO 

.•POINT TO TASK PCB 

.•REALLOCATE TASK PARTITION 



:MOV 
BPL 
ASR 
BIC 
BIC 
BISB 


(R2).-(SP) 

10S 

(SP) 

#*C<T2.AST!T2 

(SP).(R2) 

(SP)*,(R2) 


.IF DF 


CSSCKPtDSSISK 


BIT 
BEQ 
MOV 
CALL 


#T2.STP.(R2) 
5S 

T.PCB(R5).R0 
SNXTSK 


.ENDC 




MOV 


8SHEADR.R3 


.IF DF 


MSSMGE 


MFPI 

MOV 

ADD 

ADD 

J1TPI 


SP 

(SP).RO 
^.RO 
#16. (SP) 
SP 


.IFF 




MOV 
ADD 


R3.R0 
#4*2+2. RO 



;GET SAVED STACK POINTER 



;GET USER STACK POINTER 
;COPY STACK POINTER 
;STEP OVER DP6 WORD 
.•ADJUST TO NEW TOP OF STACK 
.•RESTORE USER STACK POINTER 



;COPY SAVED STACK PuinifR 
.•POINT TO FIRST USER STACK WORD 



.IF DF ASSCHK! MSSMGE 

MOV #7*2.R1 ;SET NUMBER OF BYTES TO CHECK 



**** H 12 **** 



A-DEC-77 19:56 PAGE 2-2 










CALL 
BCS 


SACHCK 
20$ 


ADDRESS CHECK TASK STACK WORDS 
IF CS ADDRESS CHECK FAILURE 




.ENDC 








.IFT 








CALL 


$RELOM 


■RELOCATE AND MAP STACK ADDRESS 




.IFTF 








MOV 
CMP 
MOV 
MOV 


(R0)*.2{SP) 
(R3)*.(R3)* 
(R0)*.(R3)* 
(R0)*.(R3)+ 


•SET DIRECTIVE STATUS TO RETURN 
; POINT TO SAVED PC 
•RESTORE PRE AST PC 
•RESTORE PRE AST PS 




.IFT 




' 




BIS 
BIC 


#CM0DE!PM0DE,-(R3) ;MAKE SURE CURRENT AND PREVIOUS IS USER 
#PR7,(R3)* .-MAKE SURE PRIORITY IS ZERO 




.IFTF 








MOV 
MOV 


(R0)>,H.EFLM(RA) .-RESTORE WAITFOR MASK WORD 
H.EFSV(R4),H.EFLMt2(RA} .-RESTORE WAITFOR MASK ADDRESS 




.IFF 








TST 
MOV 
MOV 
MOV 
MOV 
MOV 


(RO)* 

-(R3).(R0) 

-(R3),-(R0) 

-(R3).-(R0) 

-(R3).-(R0) 

RO,a$HEADR 


ADJUST TO PROPER LOCATION 

HOVE TASK PS WORD 

HOVE TASK PC WORD 

HOVE SAVED RS 

HOVE SAVED M 

SET ADDRESS OF NEW TASK STACK POINTER 




.ENDC 






10$: 


CALLR 
DRSTS 


$SETRT 
D.RS80 


FORCE A REDISPATCHIN6 OF PROCESSOR 
SET DIRECTIVE STATUS 



.IF DF A$$CHK!M$$MGE 



20$: 



000001 



MOV 
CALLR 

.ENDC 



.ENDC 
.END 



«S.CAST,R0 
$ABCTK 



.-SET AST ABORT 
.-ABORT CURRENT TASK 



•••« I 12 **** 



DRATX MACRO Mil 08 
SVPBOL TABLE 



U-DEC-77 19:56 PAGE 2-3 



CS$ORE= 

FE.CAL= 

FE.CEX= 

FE.ORV= 

FE.EXP= 

FE.EXT= 

FE.EXV= 

FE.LSI= 

FE.NUP= 

FE.HXT= 

FE.NLG- 

FE.PKT= 

FE.PLA= 

HS$RTZ= 

H.CSP 

H.CUIC 

H.DSW 

H.DUIC 

H.EFLM 

H.EFSV 

H.FCS 

H.FORT 

H.FPSA 

H.FPVA 

H.GARD 

H.HDLN 

H.IPC 

H.IPS 

H.ISP 

H.LUN 

H.NLUN 

H.NP«. 

H.ODVA 

H.OOVL 

. ABS. 



OOOAOO 

OOOOAO 

020000 

000010 

000200 

000001 

000004 

OOOAOO 

000002 

O^iOOOO 

100000 

000100 

000020 

000074 

000000 

000010 

000046 

000012 

000004 

000040 

000050 

000052 

000042 

000034 

000072 

000002 

000016 

000014 

000020 

000076 

000074 

000061 

000022 

000024 



H.OVLV 

H.PFVA 

H.RCVA 

H.RRVA 

H.SPRI 

H.TKVA 

H.TKVL 

H.VEXT 

H.UNO 

IC$$CNT= 

K$SCSR= 

KSSIENr 

KtSLDCs 

K$$TPS= 

MPAR s 

MPCSR = 

nSSCR8= 

PIRQ 3 

PRO = 

PR1 = 

PR4 = 

PR5 = 

PR6 = 

PR7 = 

PS = 

R$»F11= 

R$SJPO= 

RSSJPU 

RSSJSU 

RStKl1» 

RS$P1U 

RtSXiU 

RtSIIIN 

RM11S> 



000054 

000032 

000036 

000062 

000060 

000026 

000030 

000056 

000044 

177546 

177546 

000115 

000001 

000074 

172100 

177746 

000124 

^77772 

000000 

000040 

000200 

000240 

000300 

000340 

177776 

000001 

000000 

000001 

000001 

000001 

000001 

000001 

000000 

000000 



SWR = 
SSSECC- 

SS$VSZ= 
S.CABO- 
S.CAST= 
S.CBPT= 
S.CCRF= 
S.CEMTs 
S.CFLT= 
S.CIL1= 
S.CIOT= 
S.CLRF* 
S.COAO:: 
S.CS6F= 
S.CSST= 
S.CTRPs 
S.IGMG- 
S.PRTY* 
TPS = 
TS.BLKs 
TS.CKP= 
TS.CKRs 
TS.EXEs 
TS.MSGs 
TS.NRP= 
TS.OUT= 
TS.RDNs 
TS.RUNs 
T$$A11= 
TI$C11= 
TSSJ16- 
TSSKMGs 
T$W11 = 



177570 


T.ACTL 


000000 


T.ASTL 


001000 


T.ATT 


000024 


T.CPCB 


000022 


T.OPRI 


000004 


T.EFLG 


000030 


T.IOC 


000012 


T.LBN 


000016 


T.LDV 


000010 


T.LNK 


000006 


T.HXSZ 


000026 


T.NAM 


000000 


T.NCRE 


000002 


T.NCWF 


000020 


T.NDMO= 


000014 


T.NONR: 


000032 


T.NOSE= 


000034 


T.NLON' 


177564 


T.NLUP= 


170700 


T.OFF 


000200 


T.PCB 


000100 


T.PRI 


100000 


T.RCVL 


020000 


T.RRFL 


010000 


T.SRCT 


000400 


T.STAT 


040000 


T.ST2 


004000 


T.ST3 


000001 


T.TCBL 


000001 


T.UCB 


000001 


T2.AB0: 


000000 


T2.AST= 


000001 


T2.BFX= 



000102 
000000 
ERRORS DETECTED: 



000 
001 



000052 
000016 
000054 
000004 
000040 
000022 
000003 
000041 
000044 
000000 
000050 
000006 
000006 
000004 
000010 
000000 
000002 
000014 
000016 
000060 
000046 
000002 
000012 
000064 
000063 
000032 
000034 
000036 
000030 
000026 
000100 
100000 
004000 



VIRTUAL MEMORY USED: 3543 WORDS ( U PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:13 

C41.20]0RATX.SY0:[:41.30]0RATX/-SP=C1,nEXEMC/ML.C41.103RSXMC.C1MC]DRATX 



T2.CAF= 

T2.CHK= 

T2.CICD= 

T2.DST= 

T2.FXD= 

T2.HLT= 

T2.SPN= 

T2.STP= 

T2.TI0= 

T2.WFR= 

T3.ACP= 

T3.CAL= 

T3.CLI= 

T3.MCR= 

T3.NETS 

T3.NSD= 

T3.PMD= 

T3.PRV= 

T3.REM= 

T3.R0V= 

T3.RST= 

T3.SLV= 

VSSCTRs 

W.BATT 

U.BFPD 

W.BHVR 

W.3LGH 

W.BLPD 

W.BLVR 

W.BNPD 

W.BOFF 

W.BPCB 

W.BSIZ 



000400 
020000 
010000 
040000 
002000 
000200 
000004 
000020 
001000 
000001 
100000 
000100 
001000 
004000 
000020 
000200 
040000 
010000 
020000 
000040 
000400 
002000 
000400 
000006 
000014 
000004 
000020 
000016 
000002 
000015 
000012 
000000 
000010 



•••• J 12 *••• 




•••• K 12 •••• 



ORCIN MACRO MHOS U-OEC-77 19:56 PAGE 2 



31 

32 000000 

33 000000 

34 000000 

35 000000 



.TITLE 
.IDENT 



DRCIN 
/01.05/ 



COPYRIGHT (C) 1977 

DIGITAL EQUIPMENT CORPORATION, NAYNARD. MASS. 

THIS SOFTVARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A 
SINGLE COMPUTER SYSTEM A^'D NAY BE COPIED ONLY WITH THE 
INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE, OR 
ANY OTHER COPIES THEREOF. NAY NOT BE PROVIDED OR OTHERWISE 
MADE AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH 
SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE 
TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN 
IN DEC. 

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COWITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF 
ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION 01 

P. WANNHEDEN 24-MAY-77 

MACRO LIBRARY CALLS 



.MCALL HWDDFS,TCBDF$.PCBOFS,ITBDFS 
HWDDFS : DEFINE HARDWARE REGISTERS 

TCBDFS ; DEFINE TCB OFFSETS 

PCBOFS ; DEFINE PCS OFFSETS 

ITBDFS ; DEFINE ITB OFFSETS 



••-SDRCIN-CONNECT TO INTERRUPT. 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO CONNECT A SPECIFIED INTERRUPT 
VECTOR TO AN INTERRUPT SERVICE ROUTINE (ISR) IN THE TASK'S OWN SPACE, 
OR TO DISCONNECT A PREVIOUSLY CONNECTED INTERRUPT VECTOR 

IF THE FUNCTION "CONNECT" IS REQUESTED. THE OPERATION IS AS FOLLOWS: 
A BLOCK OF DYNAMIC MEMORY IS ALLOCATED AND SET UP AS AN INTERRUPT 
TRANSFER BLOCK (ITB). THE ITB IS LINKED TO THE 1TB LIST OF THE 
TASK WITH LISTHEAD (SINGLE WORD!!) IN T.CPCB OF THE TCB. 
CHECKPOINTING AND SHUFFLING IS DISABLED FOR THE TASK. 
THE VECTOR IS SET UP TO POINT TO THE OFFSET X.JSR IN THE ITB, 
WHICH CONTAINS A SUBROUTINE CALL TO THE SPECIAL INTERRUPT SAVE 
ROUTINE tINTSC. 

IF THE FUNCTION 't>ISCONNECT" IS REQUESTED, THE OPERATION IS 
ESSENTIALLY THE REVERSE Of WHAT IS DESCRIBED FOR "CONNECT". 



• NOTE - THE DISCONNECT FUNCTION, WHEN 



••*• I 12 **** 



ORCIN MACRO M1108 U-OEC-77 19:56 PAGE 2-1 



100 
101 
102 
103 
104 
105 

1?^ 

108 
109 
110 
111 
112 
113 
1U 



DISCONNECTING THE LAST VECTOR (OR 
ONLY), CLEARS THE CHECKPOINT-DISABLE 
BIT (T2.CKD) AND NO-SHUFFLE BIT (PS.NSF) 
REGARDLESS OF WHAT THE STATE MAS BEFORE 
VECTORS WERE CONNECTED OR ANY CHANGE IN 
STATE yHILE VECTORS WERE CONNECTED. 
(EXCEPTION - IF THE TASK IS NARKED FOR 
ABORT BECAUSE OF NENORV PARITY ERROR. 
IT IS NOT MADE SHUFFLABLE). 
*********************************************** 



DP6 FORMAT: 



UD. 00 ~ DIC(129.).DPB SIZE(7.). 

WD. 01 — INTERRUPT VECTOR ADDRESS. 

WD. 02 — BASE ADDRESS FOR MAPPING OF ISR AND 

ENABLE/DISABLE-INTERRUPT ROUTINES. 

IGNORED IN AN UNMAPPED SYSTEM. 
WD. 03 — ADDRESS OF INTERRUPT SERVICE ROUTINE. IF ZERO. DIRECTIVE 

IS "DISCONNECT FROM INTERRUPTS" AND REMAINING ARGUMENTS 

ARE IGNORED. 
WD. 04 — ADDRESS OF ENABLE/DISABLE-INTERRUPT RO<JTINE. 
WD. 05 — (LOW BYTE) LOW BYTE OF PSW TO BE SET 

BEFORE CALLING ISR. 
WD. 06 — ADDRESS OF AST ROUTINE. 



INPUTS: 



R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 
R3sP0INTER TO WD. 01 IN DPS 
R4=ADDRESS OF THE HEADER OF THE CURRENT TASK. 
R5«ADDRESS OF THE TCB OF THE CURRENT TASK. 



OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK). 

IF SUCCESSFUL COMPLETION: 
CC-C 
DIRECTIVE STATUS: 

♦ 1 
BEFORE RETURN. THE ENA6LE/DISABLE-INTERRUPTS ROUTINE 
(IF SPECIFIED) IS CALLED IN KERNEL MODE WITH CC-C CLEAR. 

IF DIRECTIVE IS REJECTED: 
CC-C 1 
DIRECTIVE STATUS: 



D.RS1 
D.RS8 

D.RS16 
D.RS17 
D.RS19 



D.RS81 



AN ITS COULD NOT BE ALLOCATED (NO POOL SPACE). 

THE FUNCTION REQUESTED IS "DISCONNECT" 

AND THE TASK IS NOT OWNER OF THE VECTOR. 

ISSUING TASK IS NOT PRIVILEGED. 

THE SPECIFIED VECTOR IS ALREADY IN USC. 

THE SPECIFIED VECTOR IS ILLEGAL (LOWER THAN 60 

OR HIGHER THAN HIGHEST VECTOR SPECIFIED AT SYSGEN, 

OR NOT A MULTIPLE OF 4). 

ISR OR ENABLE/DISABLE-INTERRUPT ROUTINE IS NOT 

WITHIN 4K WORDS FROM (BASE ADDRESS t 177700). 



•••• M 12 •••• 



DRCIN MACRO M1108 U-DEC-77 19:56 PAGE 2-2 



115 
116 
117 
118 
119 
120 
121 
122 
123 
12A 
125 
126 
127 
128 
129 
130 
131 
132 
133 
13A 
135 
136 
137 
138 
139 
UO 
HI 
^i^2 
U3 
HA 
H5 
H6 

H8 
U" 
150 
151 
152 
153 
15A 
155 
156 
157 
158 
159 
160 
161 
162 
163 
16A 
165 
166 
167 
168 
169 
170 
171 



SDRCIN:: 



.IF DF C$$INT 
.ENA8L LSB 

.IF DF MSSMGE 



BIT #T3.PRV.T.ST3(R5) ; IS TASK PRIVILEGED? 
BEQ 95S : N - ILLEGAL. JUMP 



.ENDC 



MOV 

BIT 

BNE 

CMP 

BLO 

CMP 

BHIS 

MOV 

MOV 

BEQ 



{R3)+.R« 

#3.R4 

60S 

RA,#60 

60S 

RA./KVSSCTR 

60S 

(R3)+,R0 

(R3)+.-(SP) 

40S 



GET VECTOR ADDRESS 

MULTIPLE OF «? 

N - ILLEGAL VECTOR. JUMP 

VECTOR IN RANGE? 

N - JUMP 

N ~ JUMP 

GET BASE ADDRESS 

GET ISR ADDRESS 

ZERO - DISCONNECT. JUMP 



DIRECTIVE IS "CONNECT' 



.IF NDF ESSNSI 



10S: 
15S: 



CMP 
BNE 

.IFF 

CMP 
BLO 
CMP 
BHl 

.ENDC 

BIT 
BNE 
BIS 

CLR 



aR4.#SN0NSI 
70$ 



aR4.«SNS0 
70S 

aR4.#SNS7 
70S 



«T2.CKD,aR2 
15S 

#T2.CKD.aR2 
T.CPCB(»5) 



VECTOR IN USE? 
Y - ILLEGAL. JUMP 



VECTOR IN USE? 

Y - ILLEGAL. JUMP 

Y - ILLEGAL. JUMP 



CHECKPOINTING DISABLED? 

Y - JUMP 

N - DO IT 

INITIALIZE LiST OF ITB'S 



,IF DF DSSYNM I DSSSHF 



20%: 



MOV 
BIT 
BEQ 
BIS 



.ENDC 



T.PCB(R5),R1 : GET PCS 
#PS.SYS.P.STATfR1) ,; SYSTEM CONTROLLED? 
20S : N - JUMP 

#PS.NSF.P.STAT(R1) ; SET NON-SHUFFIABLE 



***• N 12 **** 



ORCIN WACRO Ml 108 H-OEC-77 19:56 PAGE 2-3 



30»: 



.IF OF nSSMGE 



BIC 

CALL 

SUB 

BCS 

SUB 

CMP 

BHIS 

.IFTF 

l«K)V 

.IFT 

BEQ 

SUB 

BCS 

C«P 

BHIS 

ADD 

ADD 

MOV 

.IFTF 

MOV 

CALL 

BCS 

MOV 

HOV 

TST 

MOV 

MOV 

MOV 

MOV 

.IFT 

ADD 
MOV 

.IFF 

ADD 

.IFTF 

MOV 
MOV 
MOV 
CLR 



*77, RO 
$RELOC 
#20000, R2 
90t 
RO.aSP 

asp,#2Cooo 

90S 



(R3)+."(SP) 



30S 

RO.asp 

90i 

asp.»20000 

90$ 
R2.aSP 
R2.2(SP) 
R1,-(SP) 



#X.LEN.R1 

SALOCB 

SOS 

r.CPCB(R5),aR0 

R0.T.CPCB(R5) 

(R0)» 

R0.R1 

#4537, (RO)* 

#SINTSC,(R0)* 

(R3)t.aR0 



CLEAR LOWER 6 BITS IN BASE ADDRESS 

RELOCATE TO APR 6 ADDRESS 

RELOCATE TO APR 5 ADDRESS 

OUT OF RANGE - JUMP 

GET DISPLACEMENT FROM 'BASE" TO "ISR' 

.GT. AK WORDS? 

Y - ILLEGAL, JUMP 



GET ENB./DIS.INT. ROUTINE ADDRESS 



NO SUCH ROUTINE - JUMP 
GET DISPLACEMENT FROM BASE 
OUT OF RANGE - JUMP 
.GT. 4K WORDS? 
Y - ILLEGAL, JUMP 
MAKE APR 5 ADDRESSES 



SAVE APR 5 VALUE 



>JET ^ ?E OF ITB IN BYTES 

ALLOCATE AN ITB 

FAILURE - JUMP 

LINK ITB TO ITB LIST IN TCB (X.LNK) 

STEP PAST LINK WORD IN ITB 

SAVE INTERRUPT ENTRY POINT 

"JSR R5.a#SINTSC" (X.JSR) 

(K.JSR*2) 

PSW AND UNUSED BYTE (X.PSW) 



#X.REL-X.PSW.RO ; POINT TO X.REL IN ITB 
(SP)S(RO)« ; STORE APR 5 VALUE (X.REL) 



#X.DSI-X.PSW,RO ; POINT TO X.DSI IN ITB 



(SP)t.(RO)t ; STORE ENB./DIS.INT. ROUTINE ADDRESS (X.DSI) 
R5.(R0)t 1 STORE TCB ADDRESS (X.TCB) 
(S^)*,X.1SR-<X.TCB+2>(R0) ; STORE ISR ADDRESS (X.ISR) 
X.FORK»2-<X.TCB»2>(RO) ; CLEAR FORK PC WORD (X.FORK+2) 



.IF OF ASSTRP 



•••* B 13 *••* 



DRCIN MACRO Ml 108 U-OEC-77 19:56 PAGE 2-A 



**** B 13 **** 



229 
230 
231 
232 
233 
23A 
235 
236 
237 
238 
239 
2A0 
2A1 
2A2 
2A3 
2AA 
2A5 
2A6 
2A7 
2A8 
2A9 
250 
251 
252 
253 
25A 
255 
256 
257 
258 
259 
260 
261 
262 
263 
26A 
265 
266 
267 
268 
269 
270 
271 
Z7Z 
271 
27^ 
275 
276 
277 
276 
279 
280 
281 
282 
283 
2SA 
285 



35$: 



MOV 


#$DQAC.(RO)^ 


TST 
MOV 


(R0) + 
PC.(RO)* 


MOV 


#7*2*2, (R0)» 


MOV 
MOV 


aR3,(R0)* 
#1.(R0)* 


.ENDC 




MOV 
MOV 
MOV 
TST 
MOV 


RA,(RO)t 
BRA ,aRO 
R1 .aRA 
-(R1) 
X.DSI(R1).R2 


BEO 


130$ 


.IFT 




MOV 


X.RELCRD.KI 


.ENDC 




CALLR 


aR2 



DIRECTIVE IS 'DISCONNECT" 



A0$: 



60$ 
70$ 
80$ 



90$: 
95$: 

100$: 



MOV 
SUB 
BIT 
BEQ 
CALL 

BCS 
DRSTS 

DRSTS 
DRSTS 
DRSTS 

.IF DF 

DRSTS 

DRSTS 

.ENDC 

DRSTS 



aRA.RI 

#X.JSR,R1 

#T2.CKD,aR2 

100$ 

IDISIN 

100$ 
♦1 

D.RS19 
D.RS17 
0.RS1 

M$$M6E 

D.RS81 

D.RS16 

D.RS8 



STORE ADDRESS OF ROUTINE TO DEQUEUE 

AST BLOCK QUEUED BY $QASTC 

STEP PAST AST QUEUE THREAD WORD 

SET NON-ZERO TO INDICATE 

AST BLOCK FREE (A.CBL) 

NUMBER OF WORDS TO ALLOCATE ON AST STACK 

(A. BYT) 

AST ADDRESS (A.AST) 

NUMBER OF AST PARAMETERS = 1 (A.NPR) 



AST PARAMETER = VECTOR ADDRESS (X.VEC) 

SAVE VECTOR PC (X.VPC) 

SET VECTOR TO POINT TO ITB 

BACK UP TO START OF ITB AND CLEAR CC-C 

GET ADDRESS OF USER ROUTINE TO 

ENABLE/DISABLE INTERRUPTS 

NONE - EXIT 



MAP ROUTINE IN KERNEL APR 5 



CALL ROUTINE mND RETURN 
R1 = "oiJjTER TO ITB 
CC-C = TO ENABLE INTERRUPTS. 
= 1 TO DISABLE INTERRUPTS 



GET PL FROM VECTOR 

GET START OF ITB (X.LNK) 

CHECKPOINTING DISABLED? 

N - TASK HAS NO ITB'S, JUMP 

DISABLE INTERRUPTS, DEALLOCATE THE 

ITB ETCETERA 

ERROR (TASK IS NOT OWNER OF VECTOR) - JUMP 

EXIT WITH SUCCESS 

ILLEGAL VECTOR 
VECTOR ALREADY IN USE 
NO POOL SPACE 



ISR OR ENB./DIS.INT. ROUTINE ADDRESS NOT 
WITHIN RANGE (BASE81 77700, BASE8177700+AK) 
PRIVILEGE VIOLATION 



; DISCONNECT - TASK IS NOT OWNER OF VECTOR 



••♦• C 13 •••• 



•*•* C 13 **** 



DRCIN MACRO Ml 108 1A-DEC-77 19:56 PAGE 2-5 



286 
287 
288 
289 
290 
291 
292 
293 
29A 
295 
296 
297 
298 
299 
300 
301 
302 
303 
30A 
305 
306 
307 
308 
309 
310 
311 
312 
313 
3U 
315 
316 
317 
318 
319 
320 
321 
322 
323 
32A 
325 
326 
327 
328 
329 
330 
331 
332 
333 
33A 
335 
336 
337 
338 
339 
340 
3A1 
3A2 



♦*-$DtSIN-DISCONNECT INTERRUPT VECTOR. 



INPUT: 



R1 POINTER TO ITB 

R5 POINTER TO TASK TCB 



OUTPUT: 



IF SUCCESS: 

CC-C 

THE FOLLOWING OPERATIONS ARE PERFORMED: 



1, 
2. 



3. 

A. 

5. 



7. 



THE ITB IS REMOVED FROM THE ITB LIST STARTING 

IN T.CPCB OF THE TASK'S TCB. 

IF A USER ROUTINE TO DISABLE INTERP'JPTS WAS SUPPLIED 

WHEN THE VECTOR WAS CONNECTED TO, iHAT ROUTINE IS CALLED 

IN KERNEL MODE WITH CC-C SET. 

VECTOR PC IS RESTORED TO POINT TO THE NONSENSE INTERRUPT ROUTINE. 

IF THE FORK BLOCK OF THE ITB IS IN THE FORK QUEUE. IT 

IS REMOVED. 

IF THE AST BLOCK OF THE ITB IS IN THE AST QUEUE FOR THE TASK, 

IT IS REMOVED. 

IF THIS WAS THE ONLY VECTOR CONNECTED TO THE TASK. 

CHECKPOINTING IS ENABLED FOR THE TASK. IF THE TASK RUNS IN 

A SYSTEM CONTROLLED PARTITION, THE TASK IS MADE SHUFFLABLE. 

FINALLY, THE ITB IS DEALLOCATED. 



IF ERROR (TASK IS NOT OWNER OF VECTOR); 
CC-C 1 

REGISTERS ALTERED: R0,R1,R2,R3 



; 

SDISIN::MOV 
ADD 
MOV 
CALL 
MOV 
BCS 
SEC 
CALL 

MOV 

ADD 

MOV 

MTPS 

CALL 

MTPS 



R5,R0 

*T.CPCB,RO 

2(R0),-{SP) 

SQRMVT 

(SP)+,2(R0) 

130S 

35S 



GET TCB 

POINT TO ITB LISTHEAD 

SAVE WORD FOLLOWING LISTHEAD 

REMOVE FROM ITB LIST 

RESTORE WORD FOLLOWING LISTHEAD 

ITB NOT IN LIST - EXIT WITH ERROR 



; CALL USER ROUTINE TO DISABLE INTERRUPTS 

; WITH CC-C SET 
X.VPC(R1),ax.VEC(R1) ; RESTORE VECTOR PC 
/rx.FORK,Rl : POINT AT FORK BLOCK IN ITB 
#SFRKHD,RO ; GET FORK LISTHEAD 
#PR7 ; DISABLE INTERRUPTS 

IQRMVT ;;; REMOVE FROM FORK LIST IF IT IS THERE 
#0 ;;; ENABLE INTERRUPTS 



.IF DF AWTRP 

ADD /rx.AST-X.FORK.RI 

MOV R5.R0 

ADD #T.ASTL,RO 

CALL IQRMVT 



; POINT AT AST BLOCK IN ITB 

GET AST LIST LISTHEAD 

REMOVE FROM AST LIST IF IT IS THERE 



•••* D 13 **** 



wwww i; 13 ««»» 



DRCIN 


MACRO Ml 108 U-DEC-77 19:56 


PAGE 2-6 




3A3 






SUB 


3AA 








3A5 






.IFF 


3A6 








3A7 






SUB 


3A8 








3A9 






.ENDC 


350 


* 






351 
352 






??? 


353 
35A 






Ii! 


355 








356 






.IF DF 


357 








358 






MOV 


359 






in 


360 






w 


361 






362 






ilQ 


363 






CMP 


36A 






BEQ 


365 




110S: 


BIC 


366 








367 






.ENDC 


368 








369 




120$: 


MOV 


370 






CALL 


371 






CLC 


372 
373 
37A 




130S: 


RETURN 






.DSABL 


375 








376 






.ENDC 


377 








378 








379 


000001 




.END 



#X.AST,R1 



#X.F0RK.R1 



; RESTORE ITB POINTER 



; RESTORE ITB POINTER 



R1.R0 ; GET ITB POINTER IN RO 

T.CPCB(R5) ; ITB LIST NOW EMPTY? 

120$ ; N - JUMP 

#T2.CICD,T.ST2(R5) ; Y - ENABLE CHECKPOINTING 

D$$YNM I D$$SHF 

T.PCB(R5) Rl * GET PCB 

*PS.SYS.P!sTAT{Ri) ; SYSTEM CONTROLLED PARTITION? 

120$ ; N - JUMP 

#T2.ABO.T.ST2(R5) : TASK MARKED FOR ABORT? 

110$ ; N - JUMP 

T.EFLG(R5),*S.PRTY ; Y - IS REASON MEMORY PARITY ERROR? 

120$ ; Y - DON'T MAKE SHUFFLABLE 

(rPS.NSF.P.STAT(RI) ; MAKE SHUFFLABLE 



irx.LEN.RI 
$DEACB 



LSB 



GET LENGTH OF ITB 
DEALLOCATE ITB 
SUCCESS 



**** E 13 ***• 



KWWW c u wwww 



DRCIN MACRO M1108 
SYMBOL TABLE 



U-OEC-77 19:56 PAGE 2-7 



AS.DEL= 

AS.EXT= 

AS.RED= 

AS.WRT= 

A. IOC 

A.LGTH=: 

A.HPCT 

A.PCB 

A.PCBL 

A.PRl 

A.STAT 

A.TCB 

A.TCBL 

CSSORE= 

FE.CAL= 

FE.CEX= 

FE.DRV= 

FE.EXPx 

FE.EXTs 

FE.EXV= 

FE.LS1= 

FE.HUPs 

FE.MXTs 

FE.NLG- 

FE.PICT= 

FE.PLA= 

H»$RTZ^ 

KS$CNT= 

KSSCSR^ 

KUIENs 

KSSLDC= 

. ABS. 



000010 
OOOOOA 
000001 
000002 
000003 

oooou 

000011 
000012 
000000 
000002 
000010 
OOOOOA 
000006 
OOOAOO 
OOOOAO 
020000 
000010 
000200 
000001 
000004 
000400 
000002 
040000 
100000 
000100 
000020 
000074 
177546 
177546 
000115 
000001 



K$$TPS= 

MPAR = 

MPCSR = 

n$SCRB= 

PIRQ = 

PRO = 

PR1 = 

PR4 = 

PR5 = 

PR6 = 

PR7 = 

PS 

PS.APR= 

PS.CHK= 

PS.CICP= 

PS.CKR= 

PS.CO«= 

PS.OEL= 

PS.ORV= 

PS.FXD= 

PS.LIOs 

PS.NSFs 

PS. OUT* 

PS.PERs 

PS.PIC= 

PS.SVSs 

P.BLKS 

P.BUSY 

P. IOC 

P.LNK 

P. MAIN 



000074 
172100 
177746 
000124 

Mini 

000000 
000040 
000200 
000240 
000300 
000340 
177776 
000007 
010000 
040000 
020000 
000200 
000010 
000020 
004000 
001000 
000400 
100000 
002000 
000100 
000040 
000016 
000024 
000003 
000000 
000012 



P.NAM 

P.O«N 

P.PRI 

P.REL 

P.SIZE 

P.STAT 

P. SUB 

P.SWSZ 

P.TCB 

P.UAIT 

R$$F11= 

RSSJPOs 

R$$JP1= 

R$$JS1= 

RSSKII- 

R$$P11= 

RSSXil:: 

R$$11M= 
R$S11S= 
SWR : 
SS$ECC= 
S$$VSZ= 
TPS = 
TS.BLKs 
TS.CKP- 
TS.CKR= 
TS.EXE= 
TS.MS6= 
TS.NRP= 
TS.OUT= 
TS.RONs 



000004 
000026 
000002 
000014 
000016 
000030 
000010 
000022 
000026 
000020 
000001 
000000 
000001 
000001 
000001 
000001 
000001 
000000 
000000 
177570 
000000 
001000 
177564 
170700 
000200 
000100 
100000 
020000 
010000 
000400 
040000 



TS.RUN= 

T$$A11= 

T$$C11= 

TSSJ16: 

TSSKMG- 

T$$M11= 

T.ACTL 

T.ASTL 

T.ATT 

T.CPCB 

T.DPRl 

T.EFLG 

T.IOC 

T.LBN 

T.LDV 

T.LNK 

T.MXSZ 

T.NAM 

T.OFF 

T.PCB 

T.PRl 

T.RCVL 

T.RRFL 

T.SRCT 

T.STAT 

T.ST2 

T.ST3 

T.TC8L 

T.UCB 

T2.AB0= 

r2.AST= 



004000 
000001 
000001 
000001 
000000 
000001 
000052 
000016 
000054 
000004 
000040 
000022 
000003 
000041 
000044 
000000 
000050 
000006 
000060 
000046 
000002 
000012 
000064 
000063 
000032 
000034 
000036 
000030 
000026 
000100 
100000 



000070 000 
000000 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 3659 WORDS ( 15 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:15 
C41,20]DRCIN.SYO:C41.30]DRCIN/-SP=CM]EXEMC/ML.C41JO]RSXMC.C11J03DRCIN 



T2.BFX= 

T2.CAF= 

T2.CHK= 

T2.CKD= 

T2.DST= 

T2. FXD= 

T2.HLT= 

T2.SPN= 

T2.STP= 

T2.TI0= 

T2.WFR= 

T3.ACP= 

T3.CAL= 

T3.CLI= 

T3.MCR= 

T3.NET= 

T3.NSD= 

T3.PMD= 

T3.PRVS 

T3.REM= 

T3.R0V= 

T3.RST= 

T3.SLV= 

V$$CTR= 

X.DSI 

X.FORK 

X.ISR 

X.JSR 

X.LNK 

X.PSW 

X.TCB 



004000 
000400 
020000 
010000 
040000 
002000 
000200 
000004 
000020 
001000 
000001 
100000 
000100 
001000 
004000 
000020 
000200 
040000 
010000 
020000 
000040 
000400 
002000 
000400 
000022 
000012 
000010 
000002 
000000 
000006 
000024 



**t* F 13 •••♦ 




**** G 13 **** 



DRCMT MACRO MIIOB U-DEC-77 19:56 PAGE 2 



1 

2 

3 

A 

5 

6 

7 

8 

9 
10 
11 
12 
13 
U 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 

27 000000 
28 
29 
30 
31 
32 
33 
3A 
35 
36 
37 
38 
39 
40 
A1 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 

55 000000 005004 

56 000002 000404 
57 



.TITLE DRCMT 
.IDENT /04/ 



COPYRIGHT (C) 1974. 1976 

DIGITAL EQUIPMENT CORPORATION, MAVNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 04 

D. N. CUTLER 31-AUG-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 

MODIFIED BY: 

CANCEL MARK TIME AND SCHEDULE REQUESTS DIRECTIVES 

MACRO LIBRARY CALLS 



.MCALL 
CLKDFS 



CLKDFS 



.•DEFINE CLOCK QUEUE CONTROL BLOCK OFFSETS 



**-$DRCMT-CANCEL MARK TIME REQUESTS 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO CANCEL ALL MARK TIME REQUESTS 
FOR THE ISSUING TASK. 



DPB FORMAT. 

WD. 00 
INPUTS: 



DIC(27.).DPB SIZEd.). 



R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 
R3-ADDRESS OF THE LAST WORD IN THE DPB^2. 
R4=ADDRESS OF THE HEADER OF THE CURRENT TASK. 
R5=ADDRESS OF THE TCB OF THE CURRENT TASK. 

NOTE: THIS DIRECTIVE IS ALSO CALLED FROM THE EXIT DIRECTIVE AND 
ONLY REQUIRES R5 TO BE LOADED ON ENTRANCE. 



OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 
C=0 WITH A DIRECTIVE STATUS OF +1. 



.ENABL LSB 
SDRCMT::CLR R4 
BR 10$ 



.-SET TYPE OF REQUEST TO REMOVE 
;REMOVE ALL MARK TIME ENTRIES. 



**** H 13 **** 



DRCm MACRO M1108 U-OEC-77 19:56 PAGE 2-1 



*»-$ORCSR-CANCEL SCHEDULE REQUESTS 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO CANCEL ALL SCHEDULE REQUESTS FOR A 
SPECIFIED TASK. 



DPB FORMAT: 



WD. GO — 
WO. 01 - 
WD. 02 — 



DIC(25.).DP8 SIZE(3.). 
FIRST HALF OF TASK NAME. 
SECOND HALF OF TASK NAME. 



INPUTS: 



RO=:ADDRESS OF THE TCB TO CANCEL SCHEDULE REQUESTS FOR. 

R1=:ADDRESS OF THE TASK STATUS WORD OF THE TASK TO CANCEL SCHEDULE REQUES 

R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3-ADDRESS OF THE LAST WORD IN THE DPB^2. 

R4=ADDRESS OF THE HEADER OF THE CURRENT TASK. 

R5=ADDRESS OF THE TCB OF THE CURRENT TASK. 



83 

8A OOOOOA 

85 000006 

86 000010 

87 000012 

88 OOOOU 
89 

5? 



OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 
C=0 WITH A DIRECTIVE STATUS OF +1. 



010005 
00500A 

00572A 



000001 



SDRCSR: 



10S: 



MOV 


R0.R5 


CLR 


RA 


CALL 


(PC) 


TST 


(RA)^ 


CALLR 


SCLRMV 


.DSABL 


LS8 



:SET TCB ADDRESS 

.-SET INITIAL ENTRY TYPE MINUS 2 

.•REMOVE PERIODIC/SINGLE SHOT REQUESTS 

.-ADVANCE TO NEXT ENTRY TYPE 

; REMOVE ALL REMAINING ENTRIES 



.END 



#••* I 13 •••• 



DRCMT MACRO Ml 108 
SYMBOL TABLE 



U-DEC-77 19:56 PAGE 2-2 



Ct$ORE= 


OOOAOO 




CRSI 


000012 


CARS 


OOOOU 




C.SCHD= 


000002 


CAST 


000012 




CSRC 


OOOOU 


C.CSTP= 


000012 




CSSHT= 


000004 


COST 


000016 




CSUB 


000012 


CEFN 


000003 




CSYST= 


000006 


CLGTH= 


C00020 




CSVTK= 


000010 


CLNK 


000000 




CTCB 


000004 


CMR1CT= 


000000 




CTIM 


000006 


CRQT 


000002 




CUIC 


000016 


. ABS. 


000020 
000020 


000 
001 






ERRORS DETECTED: 










HS$RTZ= 
KSSCNT- 
KS$CSR= 
K$$IEN=: 
K$$LDC= 
t($$TPS= 
MSSCRB= 
R$»F11= 
R$SJPO= 



00007A 
177546 
177546 
000115 
000001 
000074 
000124 
000001 
000000 



R»iJPl= 
Rt$JS1= 
RSSKIU 
R$$P11= 
RSSX11= 
RS$11N= 
RSS11S= 
SSSECC= 
S»$YSZ= 



000001 
000001 
000001 
000001 
000001 
000000 
000000 
000000 
001000 



T$$A11= 

T$»C11= 

T$$J16= 

T$$KMG= 

TJ$«11= 

V$$CTR= 

$CLRMV= 

SDRCMT 

$DRCSR 



000001 
000001 
000001 
000000 
000001 
000400 
****** gx 

OOOOOORG 
000004RG 



VIRTUAL MEMORY USED: 1507 WORDS ( 6 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:08 
C41.20:ORCMT.SY0:C41.30]DRCMT/-SP=C1.1]EXEMC/ML.[41J0DRS)(MCC11.10]DRCMT 



*••• J 15 **** 




••♦• K 15 •••• 



DRDAR MACRO MHOB 1<i-DEC-77 19:56 PAGE 2 



i 



26 

27 000000 

28 

29 



.TITLE DRDAR 
. I DENT /03/ 



COPYRIGHT (C) 197*. 1976 

DIGITAL EQUIPMENT CORPORATION. NAYNARD. M^VSS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 03 

D. N. CUTLER 30-AUG-73 

PREVIOUSLY MODIFIED BY: 

T. J. MILLER 

MODIFIED BY: 

DISABLE/ENABLE AST RECOGNITION DIRECTIVES 

MACRO LIBRARY CALLS 



.MCALL 
TCBOFS 



TCBDFS 



.-DEFINE TASK CONTROL BLOCK OFFSETS 



**-tDRDAR-DISABLE AST RECOGNITION 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO DISABLE RECOGNITION OF ASYNCHRONOUS 
SYSTEM TRAPS FOR THE ISSUING TASK. FURTHER AST'S ARE QUEUED AS THEY OCCUR 
AND WILL BE EFFECTED WHEN AST RECOGNITION IS ENABLED. 



DPB FORMAT: 

WD. 00 
INPUTS: 



DIC(99.).DPB SIZEd.). 



R2-ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

i R3cADDRESS OF THE LAST WORD IN THE DPB«2. 

; R4=ADDRESS OF THE HEADER OF THE CURRENT TASK. 

i R5rADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C«0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF O IS RETURNED. 
C«1 IF DIRECTIVE REJECTED. 

DIRECTIVE STATUS OF 'D.RSS* IS RETURNED IF AST RECOG- 
NITION IS ALREADY DISABLED. 



.IF DF AttTRP 



«ttt i IS **** 



ORDAR MACRO M1108 1A-0EC-77 19:56 PAGE 2-1 



n 



100 
101 
102 



000001 



.ENABL 


LSB 


SDRDAR::BIT 


#T2.DST.(R2) 


BNE 


10$ 


BIS 


#T2.DST.(R2) 


RETURN 





AST RECOGNITION ALREADY DISABLED? 

IF NE YES 

DISABLE AST RECOGNITION 

RETURN DIRECTIVE STATUS OF +1 



**-$DREAR-ENABLE AST RECOGNITION 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RECOGNIZE ASYNCHORONOOS SYSTEM 
TRAPS FOR THE ISSUING TASK. AST'S THAT HAVE BEEN QUEUED WHILE AST RECOG- 
NITION WAS DISABLED ARE EFFECTED IMMEDIATELY. 



DPB FORMAT: 

WD. 00 
INPUTS: 



DIC(101.),DPB SIZEd.), 



R2''ADDRESS OF THE TASK <;TATUS WORD OF THE CURRENT TASK. 
: R3M.DDRESS OF THE LAST WORD IN THE DPBt2. 
i R4-ADDRESS OF THE HEADER OF THE CURRENT TASK. 

; RS>ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

; C=0 IF D'RECTIVE IS SUCCESSFULLY COMPLETED. 

t OIRECriVE STATUS OF t1 IS RETURNED. 

t C»1 IF DIRECTIVE IS REJECTED. 

; DIRECTIVE STATUS OF 'D.RS8' IS RETURNED IF AST RECOG- 

i NITION IS NOT DISABLED. 



AST RECOGNITION DISABLED? 

IF EQ NO 

ENABLE AST RECOGNITION 

FORCE A REDISPATCHING OF PROCESSOR 

SET DIRECTIVE STATUS 



SDREAR: 


:BIT 


#T2.DST.(R2) 




BEQ 


10S 




BIC 


#T2.DST.(R2) 




CALLR 


SSETRT 


10$: 


DRSTS 


D.RS8 




.DSABL 


LSB 



.ENDC 



.END 



••** M 13 **** 



DRDAR MACRO Ml 108 
SYMBOL TABLE 



U-OEC-77 19:56 PAGE 2-2 



CtSORE= 
H»»RTZ= 
KSSCNT= 
K$SCSR= 
KMIEN= 
»SLDC= 
KWTPS= 
NSSCRB= 
R$»F11= 
RSSJPO- 
R»»JP1= 
R»»v<S1 = 
RSSK11= 
R»$P11= 
Rt$Xl1= 
R»$11M= 
R$S11S= 



OOOAOO 
00007A 
1775A6 
1775A6 
000115 
000001 
00007A 
0001 2A 
000001 
000000 
000001 
000001 
000001 
000001 
000001 
000000 
000000 



S$SECC= 
S»$YSZ= 
TS.BLK= 
TS.CICP= 
TS.CICR= 
TS.EXE= 
TS.MSG= 
TS.NRP= 
TS.OUT= 
TS.RDN= 
TS.RUN= 
r$»A11= 
T$»C11= 
T$$J16= 
T$$KMG= 
T$$M11= 
T.ACTL 



000000 
001000 
170700 
000200 
000100 
100000 
020000 
010000 
OOOAOO 
OAOOOO 
OOAOOO 
000001 
000001 
000001 
000000 
000001 
000052 



T.ASTL 


000016 


T.ATT 


00005A 


T.CPCB 


OOOOOA 


T.OPRI 


OOOOAO 


T.EFL6 


000022 


T.IOC 


000003 


T.LBN 


0000 A 1 


T.LDV 


OOOOAA 


T.LNK 


000000 


T.MXSZ 


000050 


T.NAM 


000006 


T.OFF 


000060 


T.PCB 


0000A6 


T.PRI 


000002 


T.RCVL 


000012 


T.RRFL 


00006A 



T.SRCT 

T.STAT 

T.ST? 

T.ST3 

T.TCBL 

T.UCB 

T2.AB0= 

T2.AST= 

T2.BFX= 

T2.CAF= 

T2.CHIC= 

T2.CKD= 

T2.DST= 

T2.FX0= 

T2.HLT= 

T2.SPN= 



000063 
000032 
00003A 
000036 
000030 
000026 
000100 
100000 
OOAOOO 
OOOAOO 
020000 
010000 
OAOOOO 
002000 
000200 
OOOOOA 



. ABS. 000070 000 
OOOOOO 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 2099 WORDS ( 9 PAGES) 
DYNAMIC MEMORY: 157AA WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:09 
CA1.20:DRDAR.SYO:CA1.30]DRDAR/-SP=C1.1]EXEMC/ML.CA1.10]RSXMC.C11.10]DRDAR 



T2.STP= 
T2.TI0= 
T2.WFR= 
T3.ACP= 
T3.CAL= 
T3.CLI= 
T3.MCR= 
T3.NET= 
T3.NSD= 
T3.PM0- 
T3.PRV= 
T3.REM= 
T3.R0V= 
T3.RST= 
T3.SLV= 
V$$CTR= 



000020 
001000 
000001 
100000 
000100 
001000 
OOAOOO 
000020 
000200 
OAOOOO 
010000 
020000 
OOOOAO 
OOOAOO 
002000 
OOOAOO 



**** N 13 **** 




•*•• B U **** 



**** B 1A **** 



DROCP MACRO MHOS U-OEC-77 19:56 PAGE 2 



A 
5 



31 

32 000000 

33 



41 
4! 



.TITLE DRDCP 
, I DENT /04/ 



COPYRIGHT (C) 197A, 1978 

DIGITAL EQUIPMENT CORPORATION. MAYNARD. MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION OA 

D. N. CUTLER 5-SEP-73 

PREVIOUSLY MODIFIED BY: 

T. J. MILLER 
MODIFIED BY: 

T. J. MILLER 6-JUN-77 



TM088 — CLEAR CHECKPOINT PCB WORD ON DISABLE CHECK- 
POINTING. 



DISABLE/ENABLE CHECKPOINTING DIRECTIVES 
MACRO LIBRARY CALLS 



.MCALL 
TCBDFS 



TCBDFS 



.•DEFINE TASK CONTROL BLOCK OFFSETS 



♦♦-$DRDCP-DI SABLE CHECKPOINTING 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO DISABLE THE CHECKPOINTABILITY 
OF IE ISSUING TASK. 

DPS FORMAT: 

WD. 00 — DIC(95.).DPB SIZEd.). 

INPUTS: 

R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3=ADDRESS OF THE LAST WORD IN THE DPB+2. 

RA=ADDRESS OF THE HEADER OF THE CURRENT TASK. 

R5=A00RESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK). 

C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF ♦! IS RETURNED. 
C«1 IF DIRECTIVE IS REJECTED, 

DIRECTIVE STATUS OF 'd.RSB* IS RETURNED IF CHECKPOINTING 
IS ALREADY DISABLED FOR ISSUING TASK. 



*«•• c 1A **•• 



*«** c 14 **** 



ORDCP MACRO Ml 108 U-DEC-77 19:56 PAGE 2-1 



58 

59 

60 

61 

62 

63 

6A 

65 

66 

67 

68 

69 

70 

71 

72 

73 

7A 

75 

76 

77 

78 

79 

80 

81 

82 

83 

84 

85 

86 

87 

88 

89 

90 

91 

92 

93 

94 

95 

96 

97 

98 

99 

100 

101 

102 

103 

104 

105 

106 

107 

108 

109 

110 

111 

112 

113 

114 



DIRECTIVE STATUS OF 'D.RSIO' IS RETURNED IF THE ISSUING 
TASK IS NOT CHECKPOINTABLE. 





.IF OF 


CSSCKPKDSSISK 








.ENABL 


LSB 






SDRDCP: 


:8IT 


#T2.CHK,(R2) 


TASK CIJECKPOINTABLE? 






BNE 


20$ 


IF NE NO 






BIT 


#T2.CKD.(R2) 


•CHECKPOINTING ALREADY DISABLED? 






BNE 


30$ 


IF NE YES 






BIS 


#T2.CKD.(R2) 


DISABLE CHECKPOINTING 


TM088 
• TM088 




.IF DF 


C$$INT 




■ TM088 
TM088 




CLR 


T.CPCB(.R5) 


CLEAR CHECKPOINT PCB PTR (KB LISTHEAD) 


Tn088 
• TM088 




.ENDC 






TM088 

• TM088 

• TM088 


10$: 


RETURN 




RETURN DIRECTIVE STATUS OF +1 




20S: 


DRSTS 


D.RSIO 


SET DIRECTIVE STATUS 





**-$DRECP-ENABLE CHECKPOINTING 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO ENABLE THE CHECKPOINTABILITY 
OF THE ISSUING TASK. 

DP6 FORMAT: 

WD. 00 — DIC(97.).DPB SIZEd.). 

INPUTS: 

R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3»A0DRESS OF THE LAST WORD IN THE DP8+2. 

R4»ADDRESS OF THE HEADER OF THE CURRENT TASK. 

R5=ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF *^ IS RETURNED. 
C=1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF •D.RS8' IS RETURNED IF CHECKPOINTING 
IS ALREADY ENABLED. 



$DRECP::8IT 

EQ 



50$: 



CALLR 
DRSTS 



#T2.CKD.(R2) 

30$ 

*T2.CKD.(R2) 

T.PCB(R5),R0 

$NXTSK 

D.RS8 



CHECKPOINTING ALREADY ENABLED? 

IF EQ YES 

ENABLE CHECKPOINTING 

GET ADDRESS OF TASK PARTITION PCB 

REASSIGN PARTITION IF NECESSARY 

SET DIRECTIVE STATUS 



•••* D 14 *•** 



**** D 1^ **«* 



DROCP MACRO Ml 108 U-DEC-77 19:56 PAGE 2-2 



115 .DSABL LSB 

116 

117 .ENDC 

118 

119 

120 000001 .END 



**** E u *•** 



**** c 14 **** 



DRDCP MACRO MHOS 
SYMBOL TABLE 



U-OEC-77 19:56 PAGE 2-3 



CS$ORE= 
HtSRTZ= 
K$SCNT= 
KSSCSRs 
KS$IEN= 
K$SLDC= 
KS»TPS= 
MSSCRB= 
R$»F11= 
RtSJPO= 
R»JP1= 
R*»JS1= 
R$tKl1= 
R»$P11= 
R$$X11= 
RS$11M= 
RS»11S= 

. ABS. 



OOOAOO 
000074 
1775A6 
1775A6 
000115 
000001 
000074 
000124 
000001 
000000 
000001 
000001 
000001 
000001 
000001 
000000 
000000 



S«ECC= 
S$$YSZ= 
TS.BLK= 
TS.CKP= 
TS.CKR= 
TS.EXE= 
TS.MSG= 
TS.NRP= 
TS.OUT= 
TS.RDN= 
TS.RUN= 
T$$A11= 
T»$C11= 
T»$J16= 
T$$KMG= 
T$$M11= 
T.ACTL 



000000 
001000 
170700 
000200 
000100 
100000 
020000 
010000 
000400 
040000 
004000 
000001 
000001 
000001 
000000 
000001 
000052 



T.ASTL 


000016 


T.SRCT 


000063 


T2.STP= 


000020 


T.ATT 


000054 


T.STAT 


000032 


T2. TIO= 


001000 


T.CPCB 


000004 


T.ST? 


000034 


T2.WFR= 


000001 


T.DPRI 


000040 


T.ST3 


000036 


T3.ACP= 


100000 


T.EFLG 


000022 


T.TCBL 


000030 


T3.CAL= 


000100 


T.IOC 


000003 


T.UCB 


000026 


T3,CLI= 


001000 


T.LBN 


000041 


T2.AB0= 


000100 


T3.MCR= 


004000 


T.LDV 


000044 


T2.AST= 


100000 


T3.NET= 


000020 


T.LNK 


000000 


T2.BFX= 


004000 


T3.NSD= 


000200 


T.MXSZ 


000050 


T2.CAF= 


000400 


T3.PMD= 


040000 


T.NAH 


000006 


T2.CHIC= 


020000 


T3.PRV= 


010000 


T.OFF 


000060 


T2.CICD= 


010000 


T3.REM= 020000 


T.PCB 


000046 


T2.DST= 


040000 


T3.R0V= 


000040 


T.PRI 


000002 


T2.FX0= 


002000 


T3.RST= 


000400 


T.RCVL 


000012 


T2.HLT= 


000200 


T3.SLV= 


002000 


T.RRFL 


000064 


T2.SPN= 


000004 


V$$CTR= 


000400 



000070 000 
000000 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 2099 WORDS ( 9 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:10 

C41.20]DRDCP.SY0:C41.30DDRDCP/-SP=n.l]EXEMC/ML,C41.103RSXMC,C11,10JuRnCP 
09 



tt** f 14 •*•% 



r i«» "» 




*•*• G ^^ **«* 



DREIF MACRO MHOS H-DEC-77 19:57 PAGE 2 



S 



10 

11 

II 

\i 
W 



55 000000 

56 000000 

57 000000 



•TITLE DREIF 
. I DENT /09/ 



COPYRIGHT (C) 197«. 1978 

DIGITAL EQUIPMENT CORPORATION. MAYNARD. MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAV ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 09 

0. N. CUTLER 13-SEP-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
T. J. MILLER 

MODIFIED BY: 

T. J. MILLER 7-DEC-76 

TM069 — ADDITION OF CHECK FOR OUTSTANDING TERMINAL I/O. 
T. J. MILLER 25-JAN-77 

TM07A — CORRECT BUG IN I/O RUNDOWN. 
T. J. MILLER 21-APR-77 

TM077 — DEALLOCATE RECEIVE BY REFERENCE AST BLOCK. 
T. J. MILLER 6-JUN-77 



TM088 — CLEAN UP CONNECT TO INTERRUPT ITB'S ON TASK 
EXIT. 



T. J. MILLER 21-JUL-77 



TM096 — FIX BUG RELATING TO THE RELEASE OF MEMORY IN 
PLAS SYSTEMS. 



T. J. MILLER 5-OCT-77 



TM113 — DEALLOCATE TASK PCB ON LOAD FAILURE IN PLAS 
SYSTEM. 



EXIT DIRECTIVES 
MACRO LIBRARY CALLS 



.MCALL ABODFS.HDRDFS.PCBDFS.PKTDFS.TCBDFS 

ABODFS .'DEFINE TASK ABORT CODES 

HDRDFI .-DEFINE TASK HEADER OFFSETS 

PCBDFS .-DEFINE PARTITION CONTROL BLOCK OFFSETS 



•*•• H U •*** 



DREIF MACRO MIIOS iA-DEC-77 19:57 PAGE 2-1 



58 000000 

59 000000 
60 

61 



150700 
150777 



97 

98 000000 030011 

99 000002 00U01 
100 000004 



PKTDFS 
TCBDFS 



.•DEFINE I/O PACKET OFFSETS 
.-DEFINE TASK CONTROL BLOCK OFFSETS 



LOCAL SYMBOL DEFINITION 



CLRMSK=T2.AST!T2.DST!T2.CKD!T2.HLT1T2.AB0!T2.CAF 
CLRMSK=CLRMSK!«T2.STP!T2.SPN!T2.WFR>«2>!T2.STP!T2.SPN!T2.WFR 

;♦ 

; **-$DREIF-EXIT IF 

; THIS DIRECTIVE INSTRUCTS THE SYSTEM TO TERMINATE THE EXECUTION OF THE 
; ISSUING TASK IF, AND ONLY IF, AN INDICATED EVENT FLAG IS CLEAR. 

: DPB FORMAT: 



WO. 00 — 0IC(53.),DPB SIZE(2.). 

WD. 01 — EVENT FLAG NUMBER OF EVENT FLAG THAT MUST BE CLEAR. 



INPUTS: 



RO^EVENT FLAG MASK WORD. 

RUEVENT FLAG MASK ADDRESS. 

R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3=ADDRESS OF THE LAST WORD IN THE DPBt2. 

R4-ADDRESS OF THE HEADER OF THE CURRENT TASK. 

R5=A0DRESS OF THE TCB OF THE CURRENT TASK. 



; OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

; C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

; DIRECTIVE STATUS OF •D.R522' IS RETURNED IF THE SPECIFIED 

i EVENT FLAG IS SET. 

t C=1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RS97' IF NO OR AN INVALID EVENT 
FLAG NUMBER IS SPECIFIED. 



SDREIF: 



:BIT 
BEQ 
DRSTS 



R0,(R1) 

SDREXT 

D.R$22 



.•EVENT FLAG CLEAR? 

.•IF EQ YES 

;SET DIRECTIVE STATUS 



••-SDREXT-EXIT 



THIS DIRECTIVE INSTRUCTS THE SYSTEM TO TERMINATE THE EXECUTION OF THE 
ISSUING TASK. 

DPB FORMAT: 

WO. 00 — DIC(51.),DPB SIZEd.). 
INPUTS: 

R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 



DREIF MACRO M1108 U-OEC-77 19:57 PAGE 2-2 



115 
116 
117 
118 
119 
120 
121 
122 
123 
12A 
125 
126 
127 
128 
129 
130 

152 

133 
134 
135 
136 
137 
138 
139 
UO 
1A1 
H2 
U3 
U4 
U5 
U6 
U7 
US 
U9 
150 
151 
152 
153 
15A 
155 

160 
161 
162 
163 
164 
16S 

]» 

r 



R3=ADDRESS OF THE LAST WORD IN THE DPBt2. 
RA=ADDRESS OF THE HEADER OF THE CURRENT TASK. 
RS=ADDRESS OF THE TCB OF THE CURRENT TASK. 

NOTE: THIS DIRECTIVE IS ALSO CALLED FROM THE DISPATCHER AND 
THEREFORE ONLY REQUIRES R5 TO BE LOADED ON ENTRANCE. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

NO STATUS IS RETURNED TO THE ISSUING TASK SINCE THIS DIRECTIVE 
TERMINATES ITS EXECUTION. 



000006 



SDREXT: 


:CALL 


SDRCMT 


CANCEL MARK TIME REQUESTS 




.IF DF 


CSSINT 






BIT 


#T2.CKD.T.ST2(R5 


1 .-DOES TASK POSSIBLY HAVE Al 




BEQ 


2$ 


IF EQ NO 


1»: 


MOV 


T,CPCB{R5).R1 


PICK UP NEXT ITB POINTER 




BEQ 


2$ 


IF EQ NONE LEFT 




CALL 


SDISIN 


DISCONNECT INTERRUPT VECTOR 




BR 


IS 




2$: 






REF LABEL 



.ENDC 



000012 020567 OOOOOOG 

000016 001002 

000020 005067 OOOOOOG 

000024 052765 000200 000034 



3$: 



16< 
170 

171 



TM088 
TM088 
TM088 
TM088 
TM088 
TM088 
TM088 
TM088 
TM088 
TM088 
TM088 
TM088 
1M088 



.IF DF 


MSSCRX 


CALL 


SRLMCB 


.ENDC 




CMP 
BNE 
CLR 
BIS 


R5.$LSTLK 
3S 

fLSTLK 
♦T2.HLT.T.ST2 


.IF DF 


ASSTRPtFSSLPP 


MOV 
CALL 


#H.FPVA,R4 
SDASTT 


.ENDC 




.IF DF 


ASSTRPtP»SRFL 


MOV 
CALL 


#H.PFVA,R4 
SDASTT 



: RELEASE MCR COMMAND BUFFER 



;TASK OWN MCR DATA BASE LOCK? 

:IF NE NO 

.•CLEAR OWNER TCB ADDRESS 



TM088 

».-1 

TM088 

••-1 



.SET OFFSET TO AST CONTROL BLOCK IN HEADER 
;OECLARE FLOATING POINT AST 



;SET OFFSET TO AST CONTROL BLOCK IN HEADER 
;DECLARE POWERFAIL AST 



.ENDC 



ttt* J 14 ftt** 



OREIF MACRO MHOS U-OEC-77 19:57 PAGE 2-3 



172 
173 
17A 
175 
176 
177 
178 
179 
180 
181 
182 
183 
184 
185 
186 
187 
188 
189 
190 
191 
192 
193 
194 
195 
1% 
197 
198 
199 
200 
201 
202 
203 
204 
205 
206 
207 
208 
209 
210 
211 
212 
213 
^^^, 
215 
216 
217 
218 
219 
220 
221 
222 
221 
22i> 
225 
226 
227 
22% 



4S: 



5S: 



.IF DF ASSTRPKRSSJND 



MOV 
CALL 

.ENDC 



NOV 
CALL 

.ENDC 



JSR 

.WORD 

.WORD 

.ENDC 



BIT 

BNE 

JSR 

.WORD 

.WORD 



.ENDC 



JSR 

.WORD 

.WORD 

.ENDC 



MOV 
TSTB 



#H.RCVA.RA 
SDASTT 



.SET OFFSET TO AST CONTROL BLOCK IN HEADER 
.DECLARE RECEIVE AST 



,IF DF ASSTRPftPSSLAStPSSSRF 



#H.RRVA.R4 
SDASTT 



.•SET OFFSET TO AST CONTROL BLOCK 
.-DECLARE RECEIVE Br REFERENCE AST 



.IF DF ASSTRP!TSS6UF 



TM077 
TM077 
TH077 
TM077 
TM077 
TM077 
TM077 
TM077 



R5.MTQUE 

T.ASTL 

SDEACB 



EMPTY AST QUEUE 

OFFSET TO AST QUEUE LISTHEAD 

ADDRESS OF DEALLOCATION ROUTINE 



IF DF RSSSND 



#T3.NSD!T3.ACP.T.ST3(R5) .-FLUSH RECEIVE QUEUE? 



4$ 

R5,MTQUE 

T.RCVL 

SDEPKT 



IF NE NO 

EMPTY RECEIVE QUEUE 

OFFSET TO RECEIVE QUEUE LISTHEAD 

ADDRESS OF DEALLOCATION ROUTINE 

REF LABEL 



.IF DF PtSLASIPtSSRF 



R5.MTQUE 

T.RRFL 

SDEPKT 



EMPTY RECEIVE BY REFERENCE QUEUE 
OFFSET TO RECEIVE BY REF LISTHEAD 
ADDRESS OF DEALLOCATION ROUTINE 



.IF DF IStRAR!ISSRDN!MttMGE 



#SCNLN.-(SP) 
T.I0C(R5) 



.-SET ADDRESS OF LUT SCANNING CO-ROUTINE 
.-ANY I/O OUTSTANDING? 



.IF DF rSSBUF 



BNE 6t :1F NE YES 

BIT *T2.TIO,T.ST£(R5) .OUTSTANDING TERMINAL I/O? 



•ttt K U •••• 



ORE IF lUCRO mi 08 U-DcC-77 19:57 PAGE 2-< 



229 
230 
231 
232 
233 
234 
235 
236 
237 
238 
239 
2A0 
241 
2A2 
243 
244 
245 
246 
247 
248 
249 
250 
251 
252 
253 
254 
255 
256 
257 
258 
259 
260 
261 
262 
263 
264 
265 
266 
267 
268 
269 
270 
271 
272 
271 
27i> 
275 
276 
277 
278 
279 
280 
281 
282 
283 
284 
285 



6S: 



10$: 
20S: 



30$: 



40$: 



50$: 



60$: 
70$: 



80$: 



.ENDC 



BEQ 

BIT 

BNE 

MOV 

CALL 

NOV 

CALL 

ecs 

CALL 

BR 

CALL 

BCS 

C«P 

BNE 

NOV 

BR 

NOV 

BEQ 

ASR 

BCS 

NOV 

CNP 

NOV 

NOV 

CALL 

NOV 

BCS 

NOV 

TST 

NOV 

NOVB 

INCB 

NOVB 

CLRB 

NOV 

NOV 

NOV 

NOV 

CNP 

BNE 

INC 

INC 

NOV 

CLR 

DEC 

BGT 

CALL 

NOV 

CNPB 

BEQ 

BIS 

CALLR 

TSTB 



30$ 



«T2.ABO,T.ST2(R5) .-TASK ALREADY NARKED FOR ABORT? 



10$ 

«S.I0NG,R0 

$ABCTK 

(SP).-(SP) 

a(SP)« 

30$ 

$IOKIL 

20$ 

i(SP)« 

100$ 

$TKTCB,U.ATT(R5) 

40$ 

#I0.DET,R4 

50$ 

(R1).R2 

30$ 

R2 

30$ 

«I0.CLN,R4 

(SP)*.(SP)* 

RI.-(SP) 

#I.L6TH.R1 

$ALOCB 

(SP)».R3 

90$ 

RO.RI 

(RO)* 

$TKTCB.R2 

T.I0C{R2).-(SP) 

T.I0C(R2) 

T.PRI(R2).(R0)» 

(RO)* 

R2,(R0)* 

R3.(R0)* 

R5,(R0>« 

MAM)* 

#I0.CLN.R4 

60$ 

au.VCB(R5) 

(R3) 

#12.. R2 

(R0)» 

R2 

70$ 

$DRQRQ 

$TKTCB,R5 

T.I0C(R5).(SP)* 

5$ 



IF EQ NO 



IF NE YES 

SET REASON FOR ABORT 

ABORT CURRENT TASK 

DUPLICATE ADDRESS OF LUT SCANNING CO-ROUTINE 

GET NEXT ASSIGNED LUN 

IF CS END OF LOGICAL UNIT TABLE 

KILL I/O ON UNIT FOR CURRENT TASK 

GO AGAIN 

GET NEXT ASSIGNED LUN 

IF CS END OF LOGICAL UNIT TABLE 

.■UNIT ATTACHED TO CURRENT TASK? 

IF NE NO 

SET DETACH I/O FUNCTION 



FILE OPEN ON UNIT? 

IF EQ NO 

ACCESS OR DEACCESS PENDING? 

IF CS YES 

SET CLOSE LUN I/O FUNCTION 

CLEAN STACK 

SAVE ADDRESS OF SECOND LUN WORD 

SET LENGTH OF BLOCK 4 EDED 

ALLOCATE I/O PACKET 

RETRIEVE ADDRESS OF SECOND LUN WORD 

IF CS NO CORE AVAILABLE 

COPY ADDRESS OF I/O PACKET 

POINT TO SECOND WORD 

GET ADDRESS OF TCB OF CURRr:NT TASK 

SAVE CURRENT I/O COUNT 

INCREMENT OUTSTANDING I/O COUNT 

SET REQUEST PRIORITY 

CLEAR EVENT FLAG NUKiER 

INSERT CURRENT TASK TCB ADDRESS 

INSERT ADDRESS OF SECOND LUN WORD 

INSERT UCB ADDRESS 

INSERT I/O FUNCTION CODE 

CLOSE LUN I/O FUNCTION? 

IF NE NO 

INCREMENT VOLUME TRANSACTION COUNT 

INTERLOCK LUN USAGE 

SET LOOP COUNT 

CLEAR REMAINDER OF 1/0 PACKET 

ANY MORE TO CLEAR? 

IF GT YES 

QUEUE I/O REQUEST 

GET ADDRESS OF TiB OF CURRENT TA3K 

REQUEST ALREADY FINISHED? 



TWO 74 



.IF EQ YES 

«TS.RDN.T.STAT(R5) ;SET I/O RUNDOWN IN PROGRESS 
$TKWSE .WAITFOR SIGNIFICANT EVENT 
T.10C(R5) ;ANY I/O STILL OUTSTANDING? 



#••• L 14 •••• 



TM074 



DREIF MACRO mi08 U-OEC-77 19:57 PAGE 2-5 



286 

287 

288 

289 

290 

291 

292 

293 

29A 

295 

2% 

297 

298 

299 

300 000032 

301 

302 

303 

304 

305 000036 

306 0000A2 

307 000044 

308 000050 

309 000052 

310 000056 

311 000060 

312 000064 

313 000070 

314 000074 

315 000100 

316 000106 

317 000114 

318 000120 

319 000124 

320 000126 
321 

322 
323 
324 
325 
326 
327 
328 
329 
330 
331 
332 
333 
334 
335 
336 
337 
338 
339 
340 
341 
342 



BNE 



80$ 



062705 000034 



032715 000100 

001431 

016700 OOOOOOG 

001426 

026700 OOOOOOG 

001406 

052745 020000 



016700 OOOOOOG 103$: 

042760 020000 000032 107$: 

042760 000100 000034 

016000 000052 

005760 000052 
001365 

110$: 



,IF DF T$$BUF 



BIT 


#T2.TI0.T.ST2( 


BNE 


80$ 


.ENOC 




.ENOC 




ADD 


#T.ST2.R5 


• IF DF 


T$$KMG 


BIT 


«T2.AB0.(R5) 


BEQ 


110$ 


NOV 


$TKNPT.R0 


BEQ 


110$ 


CNP 


$T»(TCB,R0 


BEQ 


103$ 


BIS 


#TS.MSG.-(R5) 


CALL 


$EXRQN 


CALLR 


$TKWSE 


MOV 


$ACTHD.R0 


BIC 


tTS.NSG. T.STAT 


BIC 


#T2.AB0.T.ST2( 


NOV 


T.ACTL(R0).R0 


TST 


T.ACTL(RO) 


BNE 


107$ 



.ENDC 



;IF NE YES 



;IF NE YES 



TM069 
rN069 
TN069 
TN069 
TN069 
TN069 
rN069 
TN069 
TN069 



.■POINT TO SECOND TASK STATUS WORD 



TASK NARKED FOR ABORT? 

IF EQ NO 

GET TERMINATION NOTIFICATION TCB ADDRESS 

IF EQ NOT IN SYSTEM 

TERMINATION NOTIFICATION TASK BEING TERMINA1ED? 

IF EQ YES 

SET ABORT MESSAGE IN PROGRESS 

REQUEST TERMINATION NOTIFICATION TASK 

WAITFOR SIGNIFICANT EVENT 
.GET ADDRESS OF FIRST TCB 
(RO) .-CLEAR WAITING FOR MESSAGE 
RO) .-CLEAR MARKED FOR ABORT 
;GET ADDRESS OF NEXT TCB 

.-NULL TASK? ; TM096 

:IF NE MORE TO GO 
:REF LABEL 



.IF DF I$$RAR 

BIT #T3.REM.2(R5) 

BEQ 120$ 

MOV m$$CRB.R1 

CAIL $ALOCB 

BCS 90$ 

MOV RO.-{SP) 

TST (RO)* 

MOV T.UCB-T.ST2(R5 

MOV {PC)*.(RO)t 

• ASCI J /RE/ 

NOV (PC)»,(RO)* 

.ASCII m / 

MOV T.NAM-T.ST2(R5 

CALL $C5TA 

NOV T.NAM*2-T.ST2( 

CALL $C5TA 



). 



REMOVE TASK AT EXIT? 

IF EQ NO 

SET LENGTH OF BLOCK NEEDt'D 

ALLOCATE CORE BLOCK 

IF CS WAITFOR SIGNIFICANT EVENT 

SAVE ADDRESS OF CORE BLOCK 

POINT TO SECOND WORD IN BLOCK 

RO)* .-INSERT TI UCB ADDRESS 

INSERT REMOVE COMMAND 



),R1 .-GET FIRST HALF OF TASK NAME 

: CONVERT TO ASCII 
R5),R1 :GET SECOND KUF OF TASK NAME 

.-CONVERT TO ASCII 



•••* N 14 **** 



DREIF MACRO M1108 U-DEC-77 19:57 PAGE 2-6 



3A3 
3AA 
3A5 
3A6 
3A7 
3A8 
3A9 
350 
351 
352 
353 
35A 
355 
356 
357 
358 
359 
360 
361 
362 
363 
364 
365 
366 
367 
368 
369 
370 
371 
372 
373 
374 
375 
376 
377 
378 
379 
380 
381 
382 
383 
384 
385 
386 
387 
388 
389 
390 
391 
392 
393 
394 
395 
396 
597 
39^ 
399 



000126 052745 100000 
000132 042725 020100 
000136 042715 150777 



120$: 



124S: 



125$: 



126$: 



MOVB 

nov 

CALL 
.ENDC 



BIS 
BIC 



• IF DF 

MOVB 

.ENDC 



BIT 



MOV 
MOV 
BIT 
BEQ 
MOV 
MOV 
TST 
BNE 
MOV 
SUB 
CALL 

BCQ 

MOV 

CALl 

MOV 

MOV 

BEQ 

SUB 

CALL 

BR 

MOV 

MOV 

.ENDC 



#33. (RO) 
(SP)*.»1 
$QMCRL 



INSERT ALTMODE AS TERMINAL BYTE 
RETRIEVE ADDRESS OF CORE BLOCK 
QUEUE MCR COMMAND LINE 



#TS.EX£.-(R5) ;DEACTIVATE TASK 
#TS.CKR!TS.MSG.(R5)t ; CLEAR STATUS BITS 
#CLRMSK.{R5) 



A$$PF<I 

T.&PRI-T.ST2(R5).T.PRI-T.ST2(R5) .-RESTORE TASK PRIORITY 



.IF DF D$$ISK 



#T2.FXD.(R5)t 

130$ 

#TS.0UT,-4(R5) 



TASK FIXED IN MEMORY? 

IF NE YES 

SET TASK OUT OF MEMORY 



,IF OF P$$LAS 



T.PC8-T.ST3(R5).R0 .-POINT TO TASK PCB 
RO,-(SP) .-SAVE CURRENT PCB POINTER 
/rPS.SYS.P.STAT(RO) .-IS IT A SYSTEM CONTROLLED PARTITION? 



124$ 

P.MAIN(RO).(SP) 

R5.-(SP) 

T.ATT-T.ST3(R5) 

125$ 

R5,R0 

#T. ST3.ro 

$RLPAR 



;IF ta NO 

.-POI'.T BACK TO MAIN PCB 

.-SAVE ADDRESS OF THIRD STATUS WORD 

.-ATTACH QUEUE EMPTY (IF EQ LOAD FAILURE) 

;IF NE NO 

.-COPY TCB POINTER 

; POINT TO START OF TCB 

.-RELEASE TASK PARTITION 
T.PCB-T.ST3(R5).R0 .-PICK UP TASK PCB ADDRESS 
#PS.SYS.P.STAT(RO) .-SYSTEM CONTROLLED PARTITION? 
125$ ;IF EQ NO 

#P.L6TH.R1 ;SET SI,!E TO RELEASE 
$DEACB .-DEALLOCATE TASK PCB 
(SP).R5 ;PICK UP ADDRESS OF THIRD STATUS WORD 
T.ATT-T.ST3(R5),R5 .-POINT TO NEXT ATTACHMENT DESCRIPTOR 



TM096 
TM096 
TM096 
TM096 
TM096 
TM096 
♦*-1 



TM113 
TM113 
TM113 
TM113 
TM113 



126$ 

*A.TCBL.R5 

$DETRG 

125$ 

(SP)+,R5 



.-IF EQ THERE IS NONE 

;P01NT TO START OF ATTACHMENT DESCRIPTOR 

.-DETACH THE REGION 

'restore ADDRESS CF THIRD STATUS WORD 



(SP)t J.PCa-T.sii(R5) .-RESET TASK ^CB ADDRESS 



TM096 



,IF DF M$$MGE 



**** ^ 14 •*•« 



DREIF MACRO MHOS U-OEC-77 19:57 PAGE 2-7 



400 
A01 
402 
A03 
AOA 
A05 
A06 
A07 
A08 
A09 
A10 
All 
A12 
A13 
A1A 
A15 
A16 
A17 
A18 
A19 
A20 
A21 
A22 
A23 
A2A 
A2f 
A26 
A27 
A28 
A29 
A30 
A51 
A32 
A33 
A3A 
A35 
A36 
A37 
A38 
A39 
AAO 
AA1 
AA2 
AA3 
AAA 
AA5 
AA6 
AA7 
AA8 
AA9 
A50 
A51 
A52 
A53 
A5A 
A55 
A56 



130S. 



0001 A2 005067 OOOOOOG 
0001 A6 016700 OOOOOOG 
000152 



MOV RA.RO 

MOV H.HDLN(R0),R1 

CALL SDEACB 



.ENDC 



MOV 



STKTCB.RO 



:SET ADDRESS OF TASK HEADER 
;GET LENGTH OF HEADER IN BYTES 
.•DEALLOCATE HEADER 



;SET ADDRESS OF TASK TCB 



.IF NDF PSSLAS 



.IF DF 

MOV 

.IFTF 
CALL 

.IFT 

BIT 
BEQ 
NOV 
MOV 
MOV 
MOV 
CALL 

.ENDC 
.ENDC 



.ENDC 



CLR 
MOV 
CALL 



DSSYNMSMSSMGE 

T.PCB(RO),RA ;SAVE ADDRESS OF TASK PCB 



SRLPAR 



.•RELEASE TASK PARTITION 



#PS.SYS,P.STAT(RA) ;SYSTEM CONTROLLED PARTITION? 
130S ;IF EQ NO 

$TKTCB.RO ; RETRIEVE ADDRESS OF TCB 
P.MAIN(RA).T.PCB(RO) ;RESET TASK PCB POINTER 
RA.RO .-SET ADDRESS OF BLOCK TO RELEASE 

#P.LGTH,R1 ;SET LENGTH OF BLOCK TO RELEASE 
SDEACB .-DEALLOCATE PARTITION CONTROL BLOCK 



TM096 
TM096 
TM096 



;**-A 
;**-3 



.•♦♦-A 



.•REFERENCE LABEL 



SHEADR :D0 NOT SAVE CONTEXT OF CURRENT TASK 
STKTCB.RO ;GET ADDRESS OF CURRENT TCB 
lACTRM ; REMOVE TCB FROM THE ATL QUEUE 



.IF DF MStCRX 

BIT #T3.«CR,{R5) .•NCR EXTERNAL FUNCTION TASK? 

BEQ UQS :1F EQ NO 

BIC #T3.MCR,(R5) .-CLEAR MCR FUNCTION FLAG 

NOV #A.«1 .-SET SIZE OF BLOCK REQUIRED 

CALL SALOCB .-ALLOCATE CORE BLOCK 

BCS UOS ;IF CS ALLOCATION FAILURE 

NOV R0.R1 .-COPY ADDRESS OF BLOCK 

TST (RO)* .-POINT TO SECOND WORD OF BLOCK 



••** B 15 **** 



**** B 15 **** 



ORE IF MACRO M1108 



A57 

A58 

A59 

A60 

A61 

A62 

A63 

A6A 000156 

A65 

A66 

A67 

A68 

A69 

A70 

A71 

A72 

A73 

A7A 

A75 

A76 

A77 

A78 

A79 

A80 

A81 

A82 

A83 

ASA 

A85 

A86 

A87 

A88 

A89 

A90 

A91 

A92 

A93 

A9A 

A95 

A96 

A97 

A98 

A99 

500 

501 

502 

503 

50A 

505 

506 

507 

508 

509 

510 

511 

512 

513 



-OEC-77 19:57 PAGE 2-8 










MOV 
INC 
CALL 


T.UCB-T.ST3(R5). 

(RO) 

$QMCRL 


(RO) ; INSERT TI UCB ADDRESS 
•SET FLAG TO SIGNIFY MCR PROMPT 
•QUEUE MCR COMMAND LINE 




.ENDC 






1A0S: 


CALLR 


$DRDSE 


•DECLARE SIGNIFICANT EVENT 


; SUBROUTINE TO 


EMPTY QUEUE 






.IF DF 


A$$TRP!R$$SND!T$$BUF 


MTQUE: 

10S: 
13$: 


MOV 

ADD 

TST 

MOV 

CALL 

BCS 

MOV 

MOVB 

BGT 


(R5)*.RA 

(SP).RA 

(R5)* 

RA.RO 

$QRMVF 

A0$ 

R1.R0 

2(R0).R1 

20$ 


•GET OFFSET TO QUEUE LISTHEAD 
•CALCULATE ADDRESS OF QUEUE LISTHEAD 
•ADVANCE TO RETURN ADDRESS 
■SET ADDRESS OF LISTHEAD 

REMOVE AN ENTRY FROM QUEUE 

IF CS NO ENTRIES LEFT 
•SET ADDRESS OF BLOCK TO DEALLOCATE 

SET LENGTH OF BLOCK (FOR AST'S ONLY) 

IF 6T LENGTH SPECIFIED (AST'S ONLY) 



,IF DF C$$CKPftT$$BUF 



17$: 
20$: 



30$: 



A0$: 



BEQ 
CMP 
BEQ 

.IFTF 

MOV 

CALL 

BR 

.IFT 

CALL 
BR 

.ENDC 



RTS 
.ENDC 



17$ 

*T.ASTL.-A(R5j 

30$ 



#8.«2,R1 

a-(R5) 

10$ 



$FIN8F 
13$ 



R5 



;IF EQ NOT BUFFERED I/O 
.•PROCESSING AST QUEUE? 
;IF EQ YES 



;SET SIZE OF BLOCK TO RELEASE 
.•DEALLOCATE CORE BLOCK 
:G0 AGAIN 



.•FINISH BUFFERED I/O 



CO-ROUTINE TO SCAN LOGICAL UNIT TABLE 



**•• C 15 •♦•• 



***• C 15 •♦♦* 



5H 
515 
516 
517 
518 
519 
520 
521 
522 
523 
52A 
525 
526 
527 
528 
529 
530 
531 
532 
533 
53A 
535 
536 



000001 



.-77 19:57 PAGE 2-9 










.IF OF 


I$$RAR!I$$RDN!M$$MGE 


SCNLN: 


nov 


(SP) ,R3 


:SAVF RETURN ADDRESS 




CLR 


(SP) 


; START AT LUN ZERO 


10$: 


MOV 


$TKTCB,R5 


;GET ADDRESS OF CURRENT TASK TC8 




MOV 


$HEADR,R4 


;GET ADDRESS OF HEADER OF CURRENT TASK 


20$: 


MOV 


(SP).RI 


.-GET NEXT LUN NUMBER 




INC 


(SP) 


: INCREMENT LUN NUMBER 




CMP 


H.NLUN(R4),(SP) 


;END OF LUT? 




BLO 


30$ 


;IF LO YES 




CALL 


$MPLNE 


;MAP LUN NUMBER TO UCB ADDRESS 




BCS 


20$ 


;IF CS NO DEVICE ASSIGNED TO LUN 




MOV 


R0.R5 
(R3) 


:COPY UCB ADDRESS 




CALL 


.-CALL THE CALLER BACK 




MOV 


(SP)+.R3 


.■RETRIEVE RETURN ADDRESS 




BR 


10$ 


;G0 AGAIN 


30$: 


MOV 
RETURN 

.ENDC 
.END 


R3.(SP) 


:SET RETURN ADDRESS 



•••• D 15 *♦*• 



*•*• D 15 ♦*♦♦ 



DREIF MACRO M1108 
SYMBOL TABLE 



1A-DEC-77 19:57 PAGE 2-10 



AS.DEL= 

AS.EXTs 

AS.RED= 

AS.URT= 

A.AST 

A.BYT 

A.CBL 

A.DQSR 

A. IOC 

A.ICSR5 

A.L6TH= 

A.MPCT 

A.NPR 

A.PCB 

A.PCBL 

A.PRI 

A.PRM 

A.STAT 

A.TCB 

A.TCBL 

CLRMSK= 

CSSORE:: 

O.RS22= 

H»$RTZ= 

H.CSP 

H.CUIC 

H.DSW 

H.DUIC 

H.EFLM 

H.EFSV 

H.FCS 

H.FORT 

H.FPSA 

H.FPVA 

H.GARD 

H.HDLN 

H.IPC 

H.IPS 

H.ISP 

H.LUN 

H.NLUN 

H.WVA 
H.OOVL 

. ABS. 



000010 

0000^ 

OOOOOl 

000002 

000006 

OOOOOA 

000002 

177776 

000003 

17777A 

OOOOU 

000011 

000010 

000012 

000000 

000002 

000012 

000010 

OOOOOA 

000006 

150777 

OOOAOO 

****** Gx 

00007A 

000000 

000010 

0000A6 

000012 

OOOOOA 

OOOOAO 

000050 

000052 

0000A2 

00003A 

000072 

000002 

000016 

00001 A 

000020 

000076 

00007A 

000061 

000022 

00002A 



H.OVLY 

H.PFVA 

H.RCVA 

H.RRVA 

H.SPRI 

H.TKVA 

H.TKVL 

H.VEXT 

H.WND 

LAST 

I.ATTL= 

I.EFN 

I.FCN 

I.IOSB 

I.LGTHr 

I.LNK 

I.LN2 

I.PRI 

I.PRM 

I.TCB 

I.UCB 

K$$CNT= 

K$$CSR= 

K$$IEN= 

KS$LDC= 

K$$TPS= 

M$$CRB= 

PS.APR= 

PS.CHK= 

PS.CICP= 

PS.CKR= 

PS.C0M= 

PS.DEL= 

PS.DRV= 

PS.FXD= 

PS.LIO= 

PS.NSF= 

PS.OUT= 

PS.PER= 

PS.PICs 

PS.SYS= 

P.BLKS 

P. BUSY 

P. IOC 



00005A 
000032 
000036 
000062 
000060 
000026 
000030 
000056 
OOOOAA 
000022 
OOOOAA 
000003 
000012 
00001 A 
OOOOAA 
000000 
000006 
000002 
00002A 
OOOOOA 
000010 
1775A6 
1775A6 
000115 
000001 
00007A 
0001 2A 
000007 
010000 
OAOOOO 
020000 
000200 
000010 
000020 
OOAOOO 
001000 
OOOAOO 
100000 
002000 
000100 
OOOOAO 
000016 
00002A 
300003 



P.LNK 

P.MAIN 

P.NAM 

P. OWN 

P.PRl 

P.REL 

P. SIZE 

P.STAT 

P. SUB 

P.SWSZ 

P.TCB 

P. WAIT 

R$$F11= 

R$$JP0= 

R$$JP1= 

R$$JS1= 

R$SK11= 

R$$P11= 

RSSX11= 

R$$11M= 

R$$11S= 

S$$ECC= 

S$$YSZ= 

S.CABO= 

S.CAST= 

S.CBPT= 

S.CCRF= 

S.CEMT= 

S.CFLT= 

S.CILI= 

S.C10T= 

S.CLRF= 

S.C0A0= 

S.CSGF= 

S.CSST= 

S.CTRP= 

S.I0MG= 

S.PRTV= 

TS.BLK= 

TS.CKP= 

TS.CKR= 

TS.EXE= 

TS.MS6= 

TS.NRP= 



000000 
000012 
OOOOOA 
000026 
000002 
00001 A 
000016 
000030 
000010 
000022 
000026 
000020 
000001 
000000 
000001 
000001 
000001 
000001 
000001 
000000 
000000 
000000 
001000 
00002A 
000022 
OOOOOA 
000030 
000012 
000016 
000010 
000006 
000026 
000000 
000002 
000020 
OOOOU 
000032 
00003A 
170700 
000200 
000100 
100000 
020000 
010000 



177776 
000162 
ERRORS DETECTED: 



000 
001 



TS.OUT: 

rs.RDN= 

TS.RUN= 

TS$A11= 

T$$C11= 

T»$J16= 

T$SKMG-- 

T$$M11= 

T.ACTL 

T.ASTL 

T.ATT 

T.CPCB 

T.DPRl 

T.EFL6 

T.IOC 

T.LBN 

T.LDV 

T.LNK 

T.MXSZ 

T.NAN 

T.NCRE= 

T.NCWF= 

T.NDMO: 

T.NDNR= 

T.NDSE= 

T.NLDN= 

T.NLUP= 

T.OFF 

T.PCB 

T.PRI 

r.RCVL 

T.RRFL 

T.SRCT 

T.STAT 

T.ST2 

T.ST3 

T.TCBL 

T.UCB 

T2.AB0= 

T2.AST= 

T2.BFX= 

T2.CAF= 

T2.CHK= 



OOOAOO 
OAOOOO 
OOAOOO 
000001 
000001 
000001 
000000 
000001 
000052 
000016 
00005A 
OOOOOA 
OOOOAO 
000022 
000003 
0000 A 1 
OOOOAA 
000000 
000050 
000006 
000006 
OOOOOA 
000010 
000000 
000002 
00001 A 
000016 
000060 
0000A6 
000002 
000012 
00006A 
000063 
000032 
00003A 
000036 
000030 
000026 
000100 
100000 
OOAOOO 
OOOAOO 
020000 



VIRTUAL MEMORY USED: A 136 WORDS ( 17 PAGES) 
DYNAMIC MEMORY: 157AA WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:20 
CA1,20]DREIF.SYO:CA1,30DDREIF/-SP=C1.nEXEMC/ML.CA1,10JRSXMC.C11.10]DREIF 



T2.CKD= 

T2.DST= 

T2.FXD= 

T2.HLT= 

T2.SPN= 

T2.STP= 

T2.TI0= 

T2.WFR= 

T3.ACP= 

T3.CAL= 

T3.CLI= 

T3.MCR= 

T3.NET= 

T3.NSD= 

T3.PMD= 

T3.PRV= 

T3.REM= 

T3.R0V= 

T3.RST= 

T3.SLV= 

V$$CTR= 

W.BATT 

W.BFPD 

W.BHVR 

W.BLGH 

W.BLPD 

W.BLVR 

W.B^tf>D 

W.BOFF 

W.BPCB 

W.BSIZ 

$ACTHD= 

$ACTRM= 

SDRCMT= 

$DRDSE= 

SDREIF 

SDREXT 

SEXRQN= 

$HEADR= 

$LSTLK= 

$TKNPT= 

$TKTCB= 

$TKWSE= 



010000 

OAOOOO 

002000 

000200 

OOOOOA 

000020 

001000 

000001 

100000 

000100 

001000 

OOAOOO 

000020 

000200 

OAOOOO 

010000 

020000 

OOOOAO 

OOOAOO 

002000 

OOOAOO 

000006 

00001 A 

OOOOOA 

000020 

000016 

000002 

000015 

000012 

000000 

000010 

****** GX 

***«»* GX 

****** GX 

****** GX 

OOOOOORG 

000006RG 

****** GX 

****** GX 

****** GX 

****** GX 

**«*•♦ GX 

****** GX 



•*** E 1' **** 



**** £1' **** 




**** f 15 •««* 



**** p 15 **«* 



DREXP MACRO Ml 108 U-DEC-77 19:57 PAGE 2 



.TITLE DREXP 
•IDENT /01/ 



COPYRIGHT (C) 1976, 1978 

DIGITAL EQUIPMENT CORPORATION, MAYNARD. MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 01 

T. J. MILLER 8-JUL-76 

MODIFIED BY: 

T. J. MILLER 7-DEC-76 

TM069 — ADD CHECK FOR OUTSTANDING TERMINAL I/O. 

T. J. MILLER 10-JAN-77 

TM072 — DISALLOW DECREASE IN SIZE FOR TASK'S WITH 
RESIDENT OVERLAYS. 

T. J. MILLER 2-N0V-77 

TM115 — DI'.ALLOW DECREASE IN SIZE BELOW OTHER 

WINDOWS MAPPED IN TASK PARTITION (REMOVING 
TM072 CHECK). 

MACRO LIBRARY CALLS 

.MCALL HWDDFS.HDRDFS.PCBDFSJCBDFS 

HWDDFS .-DEFINE HARDWARE OFFSETS 

HDRDFS .-DEFINE TASK HEADER OFFSETS 

PCBDFS .-DEFINE PARTITION CONTROL BLOCK OFFSETS 

TCBDFS .-DEFINE TASK CONTROL BLOCK OFFSETS 

y 
**-$DREXP-EXTEND PARTITION 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO EXTEND THE PARTITION OF THE 
ISSUING TASK BY A POSITIVE OR NEGATIVE INCREMENT. 

DPB FORMAT: 

WD. 00 — 0IC(89.).DPB SIZE(3.). 
WD. 01 — EXTEND INCREMENT. 
WD. 02 — RESERVED. 

INPUTS: 

; R2=ADDRESS OF THE SECOND TASK STATUS WORD OF THE CURRENT TASK. 
; R3=ADDRESS OF THE EXTEND INCREMENT IN THE DPB. 
; R4=ADDRESS OF THE HEADER OF THE CURRENT TASK. 



*••• 6 15 **t« 



DREXP MACRO Ml 108 1A-0EC-77 19:57 PAGE 2-1 



R5=ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF '*}' IS RETUTNED. 

C=1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RSS' IF TASK NOT IN SYSTEM CON- 
TROLLED PARTITION. TASK IS NOT CHECKPOINTABLE 
AND SPECIFIED POSITIVE INCREMENT. OR TASK HAS 
PREALLOCATED CHECKPOINT SPACE AND IS EXTENUNG 
GREATER THAN INSTALLED SIZE. 

DIRECTIVE STATUS OF 'D.RSSS' IF SPECIFIED INCREMENT IS 
INVALID. 



.IF DF DS$YNM»E$SXPRMS$MGE 

$DREXP::TSTB T.I0C(R5) ;TASK HAVE OUTSTANDING I/O? 
BNE 15S ;IF NE YES 



.IF DF ASSTRPftC$SCKPKTSSBUF 



10$: 



15$: 
20$: 



BIT 
BNE 

.ENDC 



BIT 
BEQ 

.ENDC 



*T2.TI0.(R2) 
15$ 



MOV 


T.PCB(R5).R0 


BIT 


#PS.SYS.P.STAT 


BEQ 


67$ 


MOV 


T.MXSZ(R5).R1 


MOV 


{R3).R3 


BEQ 


10$ 


ADD 


P.SWSZ(R0).R3 


MOV 


R3.R1 


CMP 


RI.P.SWSZ(RO) 


BLOS 


30$ 


CMP 


R1.$MXEXT 


BHI 


45$ 


BIT 


*T2.BFX!T2.CHK 


BNE 


67$ 



,IF DF D$$YNC 



#T3.CAL,2(R2) 
30$ 



;TASK HAVE OUTSTANDING TERMINAL I/O? 
;IF NE YES 



.•POINT TO TASK PCB 
(RO) ;IS IT A SYSTEM CONTROLLED PARTITION? 

:IF EQ NO 

.•ASSUME RETURNING TO INSTALLED SIZE 

;PICK UP SPECIFIED INCREMENT 

;IF EQ DEFAULT TO INSTALLED SIZE 

.•CALCULATE NEW SIZE 

;COPY NEW SIZE 

;TASK INCREASING SIZE? 

;IF LOS NO 

INCREASING PAST CURRENT MAXIMUM? 

;IF HI YES 
!T2.CKD!T2.FXD,(R2) ;TASK CHECKPOINTABLE? ; 

;IF NE NO 

;REF LABEL 



;TASK HAVE CHECKPOINT SPACE ALLOCATED? 
:IF EQ NO 



TM069 
TM069 
TM069 
TM069 
1M069 
TM069 
TM069 
TM069 
TM069 
TM069 



TM072 
**-1 



*••* H 15 **•* 



n I J "WW. 



1A-DEC-77 19:57 PAGE 2-2 








30$: 


CMP 

BHI 

MOV 

SWAB 

RORB 

ROR 

ROR 


R1.T ,T<XSZ(R5) 

67$ 

R1,-(SP) 

(SP) 

(SP) 

(SP) 

(SP) 


EXTENDING TO LARGER THAN INSTALLED SIZE? 
IF HI YES 
COPY NEW SIZE 
CONVERT SIZE TO BYTES 




.IF DF 


P$$LAS 






CMP 
BHI 


R1 .#200 
35$ 


■NEW SIZE GREATER THAN 4K? 
•IF HI YES 




.IFTF 








CMP 
BLO 


(SP),H.HDLN(RA) 
90$ 


•NEW TASK SIZE SMALLER THAN HEADER? 
IF LO YES 




.IFT 






•- 35$: 


BIT 
BNE 

.ENDC 


#T3.R0V.2(R2) 
50$ 


•TASK HAVE RESIDENT OVERLAYS? 

•IP NE YES. IGNORE VIRTUAL ADDRESS CHKS 



43 



40$: 



MOV 

MOV 

TST 

MOV 

ASL 

ROL 

ROLB 

SWAB 

ADD 

CMP 

BHIS 

ADD 

DEC 

BLE 

ADD 

TST 

BEQ 



H.WND(R4).RA 

(RA)+.R2 

(RA) + 

(RA).R3 

R3 

R3 

R3 

R3 

R1.R3 

R3,#2000 

90$ 

(R4).(SP) 

R2 

50$ 

«W.BLGH.R4 

W.BSIZ-W.BLVR 

40$ 



•IF DF P$$LAS 



CMP 

BNE 

MOV 

SUB 

INC 

ASL 

ROL 

ROLB 

SWAB 



-2(R4).R0 

44$ 

2(R4).R3 

(R4),R3 

R3 

R3 

R3 

R3 

R3 



POINT TO NUMBER OF WINDOW BLOCKS 
PICK UP NUMBER OF WINDOW BLOCKS 
POINT TO TASK LOW VIRTUAL ADDRESS 
PICK UP TASK LOW VIRTUAL ADDRESS 
CONVERT TO 32W BLOCKS 



CALC HIGH VIRTUAL ADDRESS IN 32W BLOCKS 
LEGAL SIZE? 
IF HIS NO 

CALCULATE NEW TOP VIRTUAL ADDRESS 
MORE WINDOW BLOCKS TO GO? 
IF LE NO 

POINT TO LOW VIRTUAL ADDRESS OF NEXT 
(R4) .-ESTABLISHED WINDOW? 
IF EQ NO 



WINDOW MAPPED TO TASK REGION? (W.BPCB) 

IF NE NO 

PICK UP HIGH VIRTUAL ADDRESS (W.BHVR) 

CALCULATE LENGTH OF MAP - 1 (W.BLVR) 

CALCULATE LENGTH OF MAP 

CONVERT TO 32W BLOCKS 



TM115 
TM115 
TM115 
TM115 
TM115 
TM115 
TM115 
TM115 
TM115 
TM115 
TM115 
TM115 
TM115 



*•** I ^5 t*** 



OREXP MACRO Ml 108 



172 
173 
17A 
175 
176 
177 

1^ 

u 

181 

1} 

1 

lj 

11 



192 
193 
194 
1" 

1 



201 
202 
203 
204 
205 
206 
207 
208 
209 
210 
211 
Il2 
213 
2^'» 
215 
216 
217 
218 
219 

221 
222 
223 
22^ 
225 
226 
227 
228 



67S: 
70$: 



71$: 



7 19:57 PAGE 2-3 














ADD 


W.BOFF-W.BLVR(RA 


>.R3 .-CALCULATE LAST 32W BLOCK MAPPED 


• TM115 




CMP 


R1,R3 




REDUCING SIZE CONFLICT WITH WINDOW? 


TM115 




BLO 


90$ 




•IF 10 YES 


TM115 
TM115 




.ENDC 








TM115 
TM115 
TM115 


4A$: 


CMP 


(SP).(RA) 




■VIRTUAL ADDRESS OVERLAP? 


TM115 




BLOS 


A0$ 




IF LOS NO 


**-1 


A5$: 


BR 


90$ 




ILLEGAL SIZE 


TM072 


50$: 


TST 


(SP) + 




CLEAN STACK 


**-1 




MOV 


P.MAIN(RO) 


.R2 


•POINT TO MAIN PARTITION PCB 






CMP 


R1.P.SIZE(R2) 


•MAIN PARTITION LARGE ENOUGH? 






BHI 


90$ 




•IF HI NO 






MOV 


R1,P.SWSZ(R0) 


•SET SWAP SIZE FOR TASK PARTITION 






CLR 


RA 




INITIALIZE END OF HOLE CALCULATION 






MOV 


P.SUB(RO), 


R3 


•POINT TO NEXT SUBPAR AFTER TASK PAR 






BNE 


60$ 




IF NE THERE IS ONE 






MOV 


R2.R3 




ELSE POINT TO MAIN PARTITION 






ADD 


P.SIZE{R3) 


.R4 


CALCULATE END OF HOLE 




60$: 


ADD 


P.REL(R3). 


RA 








MOV 


P.REL(RO). 


R3 


CALCULATE END OF DESIRED SPACE 






ADD 


R1.R3 










CMP 


R3.RA 




WILL EXTEND WORK IN PLACE? 






BLOS 


70$ 




IF LOS YES 






CALL 


$SETRT 




FORCE RESCHEDULING 






MOV 


R5.R1 




COPY TASK TC8 ADDRESS 






.IF DF 


D$$VNC 










CALL 


$CHKPT 




ATTEMPT TO CHECKPOINT TASK 






BIT 


#TS.CKP,T. 


STAT(R^) ;WAS THE CHECKPOINT INITIATED? 






BEQ 


65$ 




IF EQ NO 






RETURN 










65$: 


MOV 


T.PCB(R5). 


RA 


PICK UP TASK PCB ADDRESS 


• TWIIX 




MOV 


P.SIZE(RA) 


.P.SWSZ(RA) .-RESET SWAP SIZE 


• TM11X 




DRSTS 


D.RS1 




POOL OR CHECKPOINT FILE ALLOC FAILURE 


• TMIIX 



• IFF 

CALLR $CHKPT 



**-1 



.ENDC 



DRSTS 

CMP 

BHIS 

MOV 

MOV 



D.RS8 

RI.P.SIZB(RO) 

71$ 

#$NXTSK,-(SP) 

RI.P.SIZE(RO) 



.•INITIATE CHECKPOINT OF TASK 



DIRECTIVE INCONSISTENT WITH TASK STATE 

DECREASING TASK SIZE? 

IF HIS NO 

INSURE PARTITION WILL BE REALLOCATED 

EXTtND TASK IN PLACE 



.IF DF P$$LAS 



BIT 
BNE 



#T3.ROV.T.ST3(R5) ;TASK HAVE RESIDENT OVERLAYS? 
80$ ;IF NE YES, 00 NOT CHANGE MAPPING 



*••• J 15 •««* 



OREXP MACRO Ml 108 U-OEC-77 19:57 PAGE 2-A 



229 
230 
231 
232 
233 
234 
235 
236 
237 
238 
239 
240 
2A1 
242 
2A3 
2AA 
245 
246 
247 
248 
249 
250 
251 
252 
253 
254 
255 
256 
257 
258 
259 
260 
261 
262 
263 
264 
265 
266 



.ENOC 





MOV 


P.HDR(R0},R1 


•POINT TO TASK'S HEADER 




MOV 


H.WND(R1).R1 


POINT TO NUreER OF WINDOW BLOCKS 




MOVB 


W.BFPD*2(R1).R3 


PICK UP FIRST PDR ADDRESS 


74$: 


CLR 


(R3)t 


UNMAP NEXT PDR 




DECB 


U.BNPDt2(R1} 


MORE TO GO? 




BNE 


74S 


IF NE YES 




CALL 


SMAPTK 


MAP TASK ADDRESS WINDOW 




MOV 


P.REL(R0).R3 


CALCULATE FIRST APR OFFSET 




.IF DF 


P$$LAS 






ADD 


W.B0FF-W.BLPD(R1 


I.R3 ; 




.ENDC 








MOV 


(R1).R2 


PICK UP LAST PDR IMAGE 




MOVB 


-(R1).R4 


PICK UP NUMBER OF PDR'S 




MOVB 


-(RD.RI 


PICK UP FIRST PDR ADDRESS 


75«: 


MOV 


R3.UISAR0-UISDR0(R1) .LOAD NEXT APR 




MOVB 


R2.(R1)* 


SET ACCESS NEXT PDR 




MOVB 


#1 77. (R1)* 


SET SIZE NEXT PDR 




ADD 


«200,R3 


ADVANCE APR BASE 




DEC 


R4 


MORE TO 60? 




BME 


75$ 


IF NE YES 




MOV 


R2.-{R1) 


SET LAST PDR 


80$: 


RETURN 






90S: 


DRSTS 


D.RSB4 


INVALID INCREMENT SPECIFIED 



000001 



.ENDC 



.END 



•••• K 15 •••♦ 



DREXP 


MACRO mi08 


14-0EC-77 19:57 PAGE 2-5 








SYMBOL 


TABLE 












AS.OEL= 


000010 


H.HDLN 


000002 


PS.CO»»= 000200 


TPS 


AS.EXT= 


000004 


H.IPC 


000016 


PS.DEL= 


000010 


TS.BLK 


AS.RED= 


000001 


H.IPS 


000014 


PS.DRV= 


000020 


TS.CKP 


AS.WRT= 


000002 


H.ISP 


000020 


PS.FXD= 


004000 


TS.CICR 


A. IOC 


000003 


M.LUN 


C00076 


PS.LIO= 


001000 


TS.EXE 


A.LGTHs 


OOOOU 


H.NLUN 


000074 


PS.NSF= 


000400 


TS.NSG 


A.NPCT 


000011 


H.m. 


000061 


PS.OUT= 


100000 


TS.NRP 


A.PCB 


000012 


H.ODVA 


000022 


PS.PER= 


002000 


TS.OUT 


A.PCBL 


000000 


H.ODVL 


000024 


PS.P1C= 


000100 


TS.RDN- 


A.PftI 


000002 


H.OVLY 


000054 


PS.SYS= 


000040 


TS.RUN: 


A.STAT 


000010 


H.PFVA 


000032 


P.8LICS 


000016 


TSSAII: 


A.TCB 


OOOOOA 


H.RCVA 


000036 


P.BUSV 


000024 


T»$C1l! 


A.TCBL 


000006 


H.RRVA 


000062 


P. IOC 


000003 


T$$J16: 


CtSORE^ 


000400 


H.SPRI 


000060 


P.LNK 


000000 


TSSKNG- 


FE.CAL= 


000040 


H.TKVA 


000026 


P.MAIN 


000012 


TSSM11- 


FE.CEX* 


020000 


H.TKVL 


000030 


P.NAM 


000004 


T.ACTL 


FE.DRV= 


000010 


H.VEXT 


000056 


p.oyN 


000026 


T.ASTL 


FE.EXP= 


000200 


H.WND 


000044 


P.PRI 


000002 


T.ATT 


FE.EKT* 


000001 


KUCNT= 


177546 


P.REL 


OOOOU 


T.CPCB 


FE.EXV= 


000004 


K$$CSR= 


177546 


P. SIZE 


000016 


T.DPRI 


FE.LS1= 


000400 


IC$$IEN= 000115 


P.STAT 


000030 


T.EFLC 


FE.HUPs 


000002 


•C$$LDC= 


000001 


P. SUB 


000010 


T.IOC 


FE.«XT= 


040000 


KSSTPS= 


000074 


P.SWSZ 


000022 


T.LBN 


FE.NLG* 


100000 


MPAR = 


172100 


P.TCB 


000026 


T.LOV 


FE.PKTs 


000100 


HPCSR = 


177746 


P. WAIT 


000020 


T.LNK 


FE.PLAs 


000020 


MSSCRB- 


000124 


RSSFIIr 


000001 


T.MXSZ 


H»$RTZ= 


000074 


PIRQ = 


}77772 


RSSJPO= 


000000 


r.NAM 


H.CSP 


000000 


PRO = 


000000 


RSSJPU 


000001 


T.OFF 


H.CUIC 


000010 


PR1 


000040 


RSSJS1= 


000001 


T.PCB 


H.DSW 


000046 


PR4 = 


000200 


RSSKIU 


000001 


T.PRI 


H.OUIC 


000012 


PR5 = 


000240 


RSSP11= 


000001 


r.RCVL 


H.EFLIH 


000004 


PR6 = 


000300 


RSSXilr 


000001 


T.RRFL 


H.EFSV 


000040 


PR7 = 


000340 


RSS11IM 


000000 


T.SRCT 


H.FCS 


000050 


PS 


177776 


RSSIISs 


000000 


T.STAT 


H.FORT 


000052 


PS.A?R= 


000007 


SWR 


177570 


T.ST2 


H.FPSA 


000042 


PS.CHKr 


010000 


SSSECC= 


000000 


T.ST3 


H.FPVA 


000054 


PS.CXPr 


040000 


SSSVSZ= 


001000 


T.TCBL 


H.GARD 


000072 


PS.CKR= 


020000 








. ABS. 


000102 ( 
000000 


300 
301 










ERRORS DETECTED: 













VIRTUAL MEMORY USED: 3965 WORDS ( 16 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:14 

C41 20]DRFXP.SYO:C41.30]DREXP/-SP=C1.1]£XEMC/ML.C41JO]RSXMC.Cn,10]DREXP 



177564 


T.UCB 


170700 


T2.A80= 


000200 


T2.AST= 


000100 


T2.8FX= 


100000 


T2.CAF= 


020000 


T2.CHJ(= 


010000 


T2.CKD= 


000400 


T2.DST= 


040000 


T2.FXD= 


004000 


T2.HLT= 


000001 


T2.SPN= 


000001 


T2.STP= 


000001 


T2. TI0= 


000000 


T2.WFR= 


000001 


T3.ACP= 


000052 


T3.CAL= 


000016 


T3.CLI= 


000054 


T3.MCR= 


000004 


T3.NET= 


000040 


T3.NSD= 


000022 


T3.PMD= 


000003 


T3.PRV= 


000041 


T3.REM= 


000044 


T3.R0V= 


000000 


T3.RST= 


000050 


T3.SLV= 


000006 


VS»CTR= 


000060 


W.BATT 


000046 


W.BFPD 


000002 


W.BHVR 


000012 


W.BLGH 


000064 


W.BLPD 


000063 


W.BLVR 


000032 


W.BNPD 


000034 


W.aOFF 


000036 


W.8PCB 


000030 


W.BSI7 



000026 
000100 
100000 
004000 
000400 
020000 
010000 
040000 
002000 
0002CO 
000004 
000020 
001000 
000001 
100000 
000100 
001000 
004000 
000020 
000200 
040000 
010000 
020000 
000040 
000400 
002000 
000400 
000006 
000014 
000004 
000020 
000016 
000002 
000015 
000012 
000000 
000010 



•••• L 15 •♦*• 




**t* n IS **•* 



DRGCL MACRO Ml 108 U-DEC-77 19:57 PAGE 2 



A 
5 



8 

9 
10 
11 
12 
13 
1A 
15 
16 
17 
18 
19 
20 
21 
22 
23 
2A 
25 
26 
21 
28 
29 
30 
31 
32 
33 
3A 
35 
36 
37 
38 
39 
AO 
A1 
A2 
A3 
AA 
A5 
A6 
A7 
A8 
A9 
50 
51 
52 
53 
5A 
55 
56 
57 



.TITLE DRGCL 
•IDENT /03/ 



COPYRIGHT (C) 197A. 1976 

DIGITAL EQUIPMENT CORPORATION. MAYNARD. MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 03 

D. N. CUTLER 20-SEP-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 

MODIFIED BY: 

**-SDRGCL-GET MCR COMMAND LINE 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO TRANSFER A 1 TO 80. BYTE COMMAND LINE 
TO THE LAST MCR FUNCTION TASK REQUESTED BY THE MCR DISPATCHER. 



DP6 FORMAT: 



WD„ 00 — 
WD. 01 -- 



D1C(127.).DPB SIZECAI.). 
FIRST WORD OF 80. BYTE BUFFER. 



WD. §0 — LAST WORD OF 80. BYTE BUFFER. 

INPUTS: 

R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3=A0DRESS OF THE 80. BYTE BUFFER IN THE DPS. 

RA=ADDRESS OF THE HEADER OF THE CURRENT TASK. 

R5=ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 



THE COMMAND LINE 



C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 
DIRECTIVE STATUS EQUAL TO THE LENGTH 
IN BYTES IS RETURNED. 
C=1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RSSO' IS RETURNED IF THE ISSUING 
USK IS NOT THE LAST TASK THAT WAS REQUESTED 
«Y THE MCR DISPATCHER. 



.IF DF M$$CRX 
.FNABL LS8 



•••> N !5 »«*• 



DRGCL MACRO MHOB U-DEC-77 19:57 PAGE 2-1 



SDRGCL: 


:CALL 


30$ 




BCC 


10$ 




DRSTS 


D.AS80 


10$: 


CMP 


(RO)*,(RO)+ 


20$: 


INC 


2(SP) 




MOVB 


(R0),(R3) 




CMPB 


#33. (RO)* 




BEQ 


25$ 




C«»8 


#15. (R3)* 




BNE 


20$ 


25$: 


SUB 


#2.2(SP) 



SEARCH FOR TASK COMMAND BUFFER 

IF CC ONE FOUND 

SET DIRECTIVE STATUS 

POINT rO COMMAND TEXT 

INCREMENT BYTE COUNT 

INSERT BYTE INTO USER BUFFER 

ALTMODE TERMINATOR? 

IF EO YES 

CARRIAGE RETURN? 

IF NE NO 

ADJUST TO PROPER BYTE COUNT 



h 

75 
76 



**-$RLMCB-RELEASE MCR COMMAND BUFFER 

INPUTS: 

; R5=ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: 

; IF THE COMMAND LINE CURRENTLY IN THE MCR COMMAND BUFFER IS 
I FOR THE CURRENT TASK, THEN THE BUFFER IS RELEASED AND $MCRTN 

; 13 CLEARED. 



$RLMCB::CALL 
BCS 
MOV 
MOV 
CALLR 



30$ ; SEARCH FOR TASK COMMAND BUFFER 

50$ ;IF CS NONE FOUND 

(R0),(R1) .'REMOVE BUFFER FROM LIST 

#84.. R1 ;SET LENGTH OF BUFFER TO RELEASE 

$DEACB ;DEALLOCATE BUFFER 



SUBROUTINE TO SEARCH FOR COMMAND BUFFER FOR CURRENT TASK 



30$: 
A0$: 



50$: 



000001 



MOV 

MOV 

MOV 

SEC 

BEQ 

CMP 

BNE 

RETURN 

.DSABL 

.ENDC 



.END 



#$MCRCB.RO 

RQ.R1 

(RI).RO 

50$ 

R5.2(R0) 

40$ 

LSB 



.•POINT TO COMMAND BUFFER LISTHEAD 

.-SAVE ADDRESS OF PREVIOUS BUFFER 

;GET ADDRESS OF NEXT BUFFER 

.•ASSUME END OF LIST 

;IF EQ YES 

;TCB ADDRESS MATCH? 

;IF NE NO 



*•*• B 16 **** 



**** B 16 **** 



DRGCL MACRO Ml 108 1A-DEC-77 19:57 PAGE 2-2 
SYMBOL TABLE 



K»$LDC= 000001 
K$$TPS= 00007A 
MtSCRBr 0001 2A 
R$$F11= 000001 
RS$JPO= 000000 



R$$JP1= 000001 
R$$JS1= 000001 
R$SK11= 000001 
R$$P11= 000001 
R$iXl1= 000001 



C$$ORE= OOOAOO 
Ht$RTZ= 00007A 
Kt»CNT= 1775A6 
IC$$CSR= 1775A6 
K»»IEN= 000115 

. ABS. 000000 000 
000000 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 1120 WORDS ( 5 PAGES) 
DYNAMIC MEMORY: 157AA UORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:08 

W1.20:DRGCL.SY0::A1.30]DRGCL/-SP=C1.1]EXEMC/ML.CA1.10]RSXMC.C11,10]DR6CL 
hL 



RSS11M= OOOOOO 
R$»11S= OOOOOO 
S$$ErC= OOOOOO 
S«YSZ= 001000 
T$$A11= 000001 



T$$C11= 000001 
T$»J16= 000001 
T$$KMG= OOOOOO 
T$$M11= 000001 
V$$CTR= OOOAOO 



•*** c 16 **** 



**** C 16 **** 




**** D 16 **** 



**** 16 ***■* 



DRGLI MACRO Ml 108 U-OEC-77 19:57 PAGE 2 



1 
2 
3 

4 

5 

6 

7 

8 

9 
10 
11 
12 
13 

15 

16 

17 

18 

19 

20 

21 

22 

23 

2A 

25 

26 000000 

27 

28 

29 

30 

31 

32 

33 

3A 

35 

36 

37 

38 

39 

AO 

A1 

42 

A3 

AA 

A5 

A6 

A7 

A8 

A9 

50 

51 

52 

53 

5A 

55 

56 

57 



.TITLE DRGLI 
.IDENT /06/ 



COPYRIGHT (C) 197A, 1976 

DIGITAL EQUIPMENT CORPORATION. MAYNARD. MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 06 

D. N. CUTLER 18-SEP-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
T. J. MILLER 

MODIFIED BY: 

MACRO LIBRARY CALLS 



.MCALL HWDDFS 
HWDDFS 



;DEFINE HARDWARE REGISTERS 



**-$DRGLI-GET LUN INFORMATION 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO FILL A SIX WORD BUFFER WITH 
INFORMATION ABOUT A DEVICE THAT IS ASSIGNED TO A SPECIFIED LUN. IF RE- 
QUESTS TO THE DEVICE HAVE BEEN RE-DIRECTED. THEN THE INFORMATION RETURN- 
ED PERTAINS TO THE RE-DIRECT DEVICE. 



DPB FORMAT: 

WD. 00 
WD. 01 
WD. 02 



DIC(5.).DPB SIZE(3.). 

LUN TO RETURN INFORMATION FOR. 

ADDRESS OF A SIX WORD BUFFER. 



BUFFER FORMAT: 

i;D. 00 — NAME OF ASSIGNED DEV'CE. 

WD. 01 ~ UNIT NUMBER OF ASSIGNED DEVICE AND FLAGS BYTE. 

WD. 02 ~ FIRST DEVICE CHARACTERISTICS WORD. 

WD. 03 — SECOND DEVICE CHARACTERISTICS WORD. 

WD. DA — THIRD DEVICE CHARACTERISTICS WORD. 

WD. 05 ~ FOURTH DEVICE CHARACTERISTICS WORD. 



INPUTS: 



R2=ADDRESS OF THF TASK STATUS WORD OF THE CURRENT TASK. 
R3=ADDRESS OF THE LUN IN THE DPB. 
RA=ADDRESS OF THE HEADER OF THE CURRENT TASK. 
R5=ADDRESS OF THE TCB OF THE CURRENT TASK. 



**** E 16 **** 



**** E 16 *♦** 



ORGLI MACRO M1108 U-OEC-77 19:57 PAGE 2-1 



58 
59 
60 
61 
62 
63 
6A 
65 
66 

67 000000 

68 OOOOOA 

69 000006 

70 000010 
71 

72 
73 
7A 
75 
76 
77 
78 
79 
80 

81 000012 

82 OOOOU 

83 000016 

84 000020 

85 000022 

86 00002A 

87 000026 

88 000030 

89 00003A 

90 000036 
91 

92 

93 

9A 

95 

96 

97 

98 

99 
100 
101 

102 000042 

103 0OOOA4 

104 000050 

105 000052 

106 000054 

107 000056 

108 000060 

109 OOOOtZ 
110 

111 



103426 
010004 
011303 



OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF +1 IS RETURNED. 
C=1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF ■D.RS5' IS RETURNED IF NO DEVICE 
IS ASSIGNED TO THE SPECIFIED LUN. 



SDR6LI::CALL 
BCS 
MOV 
MOV 



011402 
005722 
010400 
162200 
012223 
012213 
012201 

060023 

112743 000200 



005203 

062704 OOOOOOG 

012423 

012423 

012423 

011413 



000001 



Sli 



lOli 



MOV 
CALL 

.ENDC 



SMPLUN 
10$ 
R0.R4 
(R3).R3 



.IF DF A$$CHK!M$$MGE 



*6*2.R1 
SACHKP 



(R4),R2 

(R2)* 

R4,R0 

(R2)+,R0 

(R2)*.(R3)+ 

{R2)+,(R3) 

(R2)*.R1 

SDIV 

R0.(R3)+ 

*200.-(R3) 



.IF DF L$$DRV 



HAP LUN TO UCB ADDRESS 
IF CS NO DEVICE ASSIGNED 
SAVE ADDRESS OF DEVICE UCB 
GET ADDRESS OF BUFFER 



;SET LENGTH OF BUFFER 
: ADDRESS CHECK BUFFER 



GET ADDRESS OF DEVICE DCB 

POINT TO ADDRESS OF FIRST UCB 

COPY ADDRESS OF UCB 

CALCULATE RELATIVE ADDRESS OF UCB 

INSERT GENERIC DEVICE NAME 

PICK UP LOW UNIT NUMBER FOR DCB 

PICK UP UCB LENGTH 

CALCULATE RELATIVE UNIT NUMBER 

CALCULATE LOGICAL UNIT NUMBER 

ASSUME RESIDENT DRIVER 



TST 


(R2) 




DRIVER RESIDENT? 


BNE 


5S 




IF NE YES 


CLRB 


(R3) 




ELSE INDICATE DRIVER IS NONRESIDENT 


.ENDC 








INC 


R3 




ADVANCE POINTER 


ADD 


#u.cw 


.R4 


POINT TO FIRST CHARACTERISTICS WORD 


!8v 


(R4)*, 


(R3)* 


INSERT DEVICE CHARACTERISTICS WORDS 


{R4)t. 


(R3)* 




M(V 


(R4)+, 


{R3) + 




MOV 


(R4), 


R3) 




RETURN 






RETURN DIRECTIVE STATUS OF ♦! 


DRSTS 


D.RS5 




SET DIRECTIVE STATUS 



.END 



**•* f K **** 



**** F 16 *♦** 



DRGLI MACRO M1108 
SYMBOL TABLE 



U-OEC-77 19:57 PAGE 2-2 



CS$ORE= 
D.RS5 = 
FE.CAL= 
FE.CEX= 
FE.DRV= 
FE.EXP= 
FE.EXT= 
FE.EXV= 
FE.LSI= 
FE.MUP= 
FE.MXT= 

. ABS. 



OOOAOO 

**•«*♦ 6X 

OOOOAO 

020000 

000010 

000200 

000001 

OOOOOA 

000400 

000002 

OAOOOO 



FE.NLG= 
FE.PKT= 
FE.PLA= 
H$$RTZ= 
K$$CNT= 
K$SCSR= 
KS$IEN= 
IC*$LDC= 
K$STPS= 
WAR = 
MPCSR = 



10C000 
000100 
000020 
00007A 
1775A6 
1775A6 
000115 
000001 
00007A 
172100 
1777A6 



M$$CRB= 


000124 


PIRQ = 


177772 


PRO = 


000000 


PR1 = 


000040 


PRA = 


000200 


PR5 = 


000240 


PR6 = 


000300 


PR7 = 


000340 


PS 


177776 


R$$F11= 


000001 


R$SJPO= 


000000 



R$$JP1= 
RSSJS1= 
R$$K11= 
R$SP11= 
'R$*X11= 
RSS11M= 
R$»11S= 
SWR = 
S$SECC= 
S$$YSZ= 
TPS = 



000001 
000001 
000001 
OOOC01 
000001 

oooooo 

000000 
177570 
OOOOOO 
001000 
177564 



T$$A11= 

T$$C11= 

T*iJ16= 

T^$ICM6= 

T$$M11= 

'J.CW1 = 

V$$CTR= 

$DIV = 

SDRGLI 

$MPLUN= 



000001 
000001 
000001 
OOOOOO 
000001 
****** 

000400 

****** 

OOOOOORG 
****** GX 



GX 
GX 



OOOOOO 000 
000064 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 1763 WORDS ( 7 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:10 

C41,203DRGLI,SYO:C41,303DRGLI/-SP=C1,nEXEMC/Mi..C41.10]RSXMC.C11JO]ORGLI 
■f 



**** G 16 **** 



WWWW \] IQ WWV 




*«** H 16 **** 



*•** H 16 **** 



DRGPP MACRO M1108 U-DEC-77 19:58 PAGE 2 



1 
2 
3 
A 
5 



8 
9 
10 
11 
12 
13 
1A 
15 
16 
17 
18 
19 
20 
21 



24 

25 

26 000000 

27 000000 
28 



.TITLE DRGPP 
. I DENT /05/ 



COPYRIGHT (C) 197A. 1976 

DJCITAL EQUIPMENT CORPORATION. MAYNARD. MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 05 

D. N. CUTLER 3-JAN-7A 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
T. J. MILLER 

MODIFIED BY: 

MACRO LIBRARY CALLS 



.MCALL PCBDF$.TCBDFS 

PCBDF$ 

TCBDF$ 



.•DEFINE PARTITION CONTROL BLOCK OFFSETS 
.•DEFINE TASK CONTROL BLOCK OFFSETS 



**-$DRGPP-GET PARTITION PARAMETERS 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO FILL A THREE WORD BUFFER WITH 
PARTITION PARAMETERS. 



DP6 FORMAT: 

WD. 00 

WD. 01 

WD. 02 

WD. 03 



DIC(65.).DPB SIZE(A.). 
FIRST HALF OF OPTIONAL PARTITION NAME. 
SECOND HALF OF OPTIONAL PARTITION NAME. 
ADDRESS OF A THREE WORD BUFFER. 



BUFFER FORMAT: 

WD. 00 — BASE ADDRESS OF PARTITION IN 32W BLOCKS. 
WD. 01 — SIZE OF PARTITION IN 32W BLOCKS. 
WD. 02 — PARTITION FLAGS WORD. 

INPUTS: 

R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 
R3=ADDRESS OF THE PARTITION NAME IN THE DPB. 
RAsADDRESS OF THE HEADER OF THE CURRENT TASK. 
R5=ADDRESS OF THE TCB OF THE CURRENT TASK. 

0UTf>U»3: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 



**•* I K **** 



'" i lO wwww 



58 

61 
62 
6S 
64 
65 






7A 
75 



^-OEC-77 19:58 


PAGE 2-1 




DIRECTIVE STATUS 


EQUAL TO THE STARTING VIRTUAL ADDRESS 










OF THE SPECIFIED PARTITION IS RETURNED. 








C=1 IF 


DIRECTIVE IS REJECTED. 










DIRECTIVE STATUS 


OF •D.RS2' IS RETURNED IF SPECIFIED 






- 




PARTITION IS NOT IN SYSTEM. 






.IF OF 


G$$TPP 








.IF DF 


P$$LAS 






SDRGPP: 


:TST 


(R3)* 


PARTITION NAME SPECIFIED? 






BNE 


10$ 


IF NE YES 






CALL 


$SRATT 


SEARCH FOk kEGION ID 






MOV 


A.PCB(R5).R2 


■PICK UP PCS ADDRESS 






BR 


30$ 






10$: 


TST 


-(R3) 


POINT TO FIRST WORD OF PARTITION NAME 






CALL 


$SRNAM 


•SEARCH FOR NAMED PARTITION 






BCC 


20$ 


•IF CC NAMED PARTITION FOUND 






DRSTS 


D.RS2 


INVALID PARTITION NAME 




20$: 


TST 


(R3)* 


•ADVANCE POINTER 




30$: 


MOV 
.IFF 


R2.R4 


COPY PCB POINTER 




$DRGPP: 


:M0V 


(R3)*.R0 


PARTITION SPECIFIED? 






BEQ 


30$ 


IF EQ NO 






MOV 


$PARHD.RA 


GET ADDRESS OF FIRST PARTITION PCB 




10$: 


CMP 


RO,P.NAM(RA) 


FIRST HALF OF NAME MATCH? 






BNE 


20$ 


IF NE NO 






CMP 


(R3).P.NAM*2{RA) 


.•SECOND HALF OF NAME MATCH? 






BEQ 


40$ 


IF EQ YES 




20$: 


MOV 


(R«).R4 


GET ADDRESS OF NEXT PCB 






BNE 


10$ 


IF NE MORE TO SCAN 






DRSTS 


D.RS2 


SET DIRECTIVE STATUS 




30$: 


MOV 


T.PCB(R5).RA 


GET PCB ADDRESS OF CURRENT TASK 








.ENDC 







40$: 



MOV 



2(R3).R3 



.IF DF A$$CHK!M$$MGE 



MOV 
CALL 

.ENDC 



#3*2, R1 
$ACHKP 



;GET ADDRESS OF 3 WORD BUFFER 



.-SET LENGTH OF BUFFER 
.'ADDRESS CHECK BUFFER 



.IF DF M$$MGE 

MOV P.REL(RA),(R3)+ .-INSERT PHYSICAL ADDRESS OF PARTITION 

CLR 2(SP) ;SET DIRECTIVE STATUS WORD 



*••• J 16 ***« 



DRGPP MACRO Ml 108 U-DEC-77 19:58 PAGE 2-2 



60$: 



000001 



.IFF 



MOV 
MOV 
MOV 


P.REL(RA).R1 

R1.(R3)+ 

R1.2(SP) 


.IFTF 




MOV 
CLR 


P.S1ZE(RA).(R 
(R3) 


.IF DF 


DSSVNnSnSSMGE 


bIT 
BNE 


#PS.SYS.P.STA 
60S 


.ENDC 




INC 


(R3) 


.IFF 




CALL 

SWAB 

ASLB 

ROL 

ROL 


(PC) 

-(R3) 

1(R3) 

(R3) 

(R3) 


.ENDC 




RETURN 




.ENDC 





.END 



;GET STARTING VIRTUAL ADDRESS OF PARTITION 
; INSERT PHYSICAL ADDRESS OF PARTITION 
;SET DIRECTIVE STATUS WORi) 



.-ASSUME SYSTEM CONTROLLED PARTITION 



;IF NE YES 



;SET USER CONTROLLED PARTITION 



[CONVERT LENGTH TO 32W BLOCKS 
; CONVERT TO 32W BLOCKS 



**** K 16 **** 



K lO "«w» 



DRGPP MACRO ni108 
SYMBOL TABLE 



U-OEC-77 19:58 PAGE 2-3 



AS.OEL= 

AS.EXT= 

AS.RED= 

AS.WRT= 

A. IOC 

A.LGTH= 

A.MPCT 

A.PCB 

A.PCBL 

A.PRI 

A.STAT 

A.TCB 

A.TCBL 

C$$ORE= 

Ht$RTZ= 

K»»CNT= 

KSSCSRs 

KS$IEN= 

K»$LOC= 

K$$TPS= 

M$$CRB= 

PS.APR= 

PS.CHIC= 

PS.CJCP= 

PS.CKR= 

. ABS. 



000010 
OOOOOA 
000001 
000002 
000003 
OOOOU 
000011 
000012 

oooooo 

000002 
000010 
000004 
000006 
OOOAOO 
00007A 
177546 
177546 
000115 
000001 
000074 
000124 
000007 
010000 
040000 
020000 



PS.C0M= 

PS.OEL= 

PS.DRV= 

PS.FXD= 

PS.LIO= 

PS.NSF= 

PS.OUT= 

PS.PER= 

PS.PIC= 

PS.SYS= 

P.BLKS 

P.BUSY 

P. IOC 

P.LNK 

P.MAIN 

P.^^AM 

P.OUN 

P.PRI 

P.REL 

P. SIZE 

P.STAT 

P. SUB 

P.SWSZ 

P.TCB 

P. WAIT 



000200 
000010 
000020 
004000 
001000 
000400 
10000G 
002000 
000100 
000040 
000016 
000024 
000003 
OOOOOO 
000012 
000004 
000026 
000002 
000014 
000016 
000030 
000010 
000022 
000026 
000020 



R$$F11= 
RSSJP0=: 
R$SJP1= 
R$iJS1= 
R$$K11= 
R$$P11= 
R$$X11= 
R$$11M= 
R$$11S= 
S$SECC= 
SS$VSZ= 
TS.BLK= 
TS.CKP= 
TS.CKR= 
TS.EXE= 
TS.MSG= 
TS.NRP= 
TS.OUT= 
TS.RDN= 
TS.RUN= 
T$$A11= 
T$$C11= 
T$$J16= 
T$$KM6= 
T$$«11= 



000001 


T.ACTL 


000052 


T2.BFX= 


004000 


oooooo 


T.ASTL 


000016 


T2.CAF= 


000400 


000001 


T.ATT 


000054 


T2.CHK= 


020000 


000001 


T.cpca 


000004 


T2,CKD= 


010000 


000001 


T.'>PRI 


000040 


T2.DST= 


040000 


000001 


T.EFL6 


000022 


T2.»-XD= 


002000 


000001 


T.IOC 


000003 


r2.HLT--: 


000200 


oooooo 


T.LBN 


000041 


T2.SPN= 


000004 


oooooo 


T.LDV 


000044 


TP.STP:^ 


000020 


oooooo 


T.LNK 


OOOOOO 


T2.TI0= 


001000 


001000 


T.MXSZ 


000050 


T2.WFR= 


000001 


170700 


T.NAM 


000006 


T3.ACP= 


100000 


000200 


T.OFF 


000060 


T3.CAL= 


000100 


000100 


T.PCB 


000046 


T3.CLI= 


001000 


100000 


T.PRI 


000002 


T3.MCR= 


004000 


020000 


T.RCVL 


000012 


T3.NET= 


000020 


010000 


T.RRFL 


000064 


T3.NSD= 


000200 


000400 


T.SRCT 


000063 


T3.PM0= 


040000 


040000 


T.STAT 


000032 


T3.PRV= 


010000 


004000 


T.ST2 


000034 


T3.REM= 


020000 


000001 


T.ST3 


000036 


T3.R0V= 


000040 


000001 


T.TC3L 


000030 


T3.RST= 


000400 


000001 


T.UCB 


000026 


T3.SLV= 


OCiOOO 


oooooo 


T2.AB0= 


000100 


V$»CTR= 


0C0400 


000001 


T2.AST= 


100000 







000070 000 
OOOOOO 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 2800 WORDS ( 11 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:12 
C41,20]DRGPP.SY0:C41.30]DRGPP/-SP=C1.1]EXEMC/ML.C41.10JRSXMC.C11J0]0RGPP 

ly 



**•* L 16 ***^ 




•*•• III 15 **** 



B 




MSCCM 


J 




ERSLP 


E 1 





SLPSB 


M 


14 


DREIF 


C 




MSCCN 


K 




ERSLP 


F 1 







N 


14 


DREIF 


D 




MSCCM 


L 




ERSLP 


G 1 





DROSP 


B 


15 


DREIF 


E 




MSCCM 


M 




ERSLP 


H 1 





DRDSP 


C 


15 


DREIF 


F 




MSCCM 


N 






I 1 





ORDSP 


D 


15 


DREIF 


G 




MSCCM 


B 




GETLN 


J 1 





DRDSP 


E 


15 


DREIF 


H 




MSCCM 


C 




GETLN 


IC 1 





DRDSP 


F 


15 




1 






D 




GETLN 


L 1 





DRDSP 


G 


15 


DREXP 


J 




OPCLS 


E 






M 1 





DRDSP 


H 


15 


DREXP 


K 




OPCLS 


F 




GTSLP 


N ' 





DRDSP 


I 


15 


DREXP 


L 




OPCLS 


G 




GTSLP 


B 1 


1 


DRDSP 


J 


15 


DREXP 


n 






H 




GTSLP 


C 1 


1 


DRDSP 


K 


15 


DREXP 


N 




SAVE 


I 




GTSLP 


1 


1 


DRDSP 


L 


15 


DREXP 


B 


2 


SAVE 


J 






E 1 


1 


DRDSP 


M 


15 




C 


2 


SAVE 


K 




lOSLP 


F 


1 


DRDSP 


N 


15 


DRGCL 


D 


2 




L 




lOSLP 


G 1 


1 


DRDSP 


B 


16 


DRGCL 


E 


2 


SCAN 


M 




lOSLP 


H 1 


1 


DRDSP 


C 


16 


DRGCL 


F 


2 


SCAN 


N 




lOSLP 


I 1 


1 


DRDSP 


D 


16 




G 


2 


SCAN 


B 




lOSLP 


J 1 


1 




E 


16 


DRGLI 


H 


2 


SCAN 


C 




lOSLP 


K 


11 


DRABO 


F 


16 


DR6LI 


I 


2 




D 




lOSLP 


L ' 


1 


DRABO 


G 


16 


DRGLI 


J 


2 


SRCCM 


E 






M 


1 


DRABO 


H 


16 




IC 


2 


SRCCM 


F 




OP^.FL 


N 


1 




I 


16 


DRGPP 


L 


2 


SRCCM 


G 




OPMFL 


B 1 


2 


DRASG 


J 


16 


DRGPP 


n 


2 


SRCCM 


H 




OPflFL 


c ■ 


2 


DRASG 


K 


16 


DRGPP 


H 


2 


SRCCM 


I 






D 1 


2 


DRASG 


L 


16 


DRGPP 


B 




SRCCM 


J 




POSIT 


E 1 


2 


DRASG 


M 


16 




C 




SRCCM 


K 




POSIT 


F 1 


2 










D 




SRCCM 


L 




POSIT 


G 1 


2 


DRATX 








E 




SRCCM 


M 




POSIT 


H 


2 


DRATX 








F 






N 




POSIT 


I 1 


2 


DRArx 








G 




START 


B 


8 


POSIT 


J 


2 


DRATX 








H 




START 


C 


8 


POSIT 


K ' 


2 










I 




START 


D 


8 


POSIT 


L 1 


2 


DRCIN 








J 




START 


E 


8 


POSIT 


M 


12 


DRCIN 








K 




START 


F 


8 


POSIT 


N 


12 


DRCIN 








L 




START 


G 


8 




B 


13 


DRCIN 








n 




START 


H 


8 


PUTLN 


c 


13 


DRCIN 








N 






I 


8 


PUTLN 


D 


3 


DRCIN 








B 




TTYIO 


J 


8 


PUTLN 


E 


3 


DRCIN 








c 




TTVIO 


K 


8 


PUTLN 


F 


13 


DRCIN 








D 




TTYIO 


L 


8 




G 


13 










E 




TTYIO 


M 


8 


SCSLP 


H 


3 


DRCKT 








F 




TTYIO 


N 


8 


SCSLP 


I 


13 


DRCMT 








G 






B 


9 


SCSLP 


J ' 


3 


DRCMT 








H 




UNSAV 


C 


9 


SCSLP 


K 


13 










1 




UNSAV 


D 


9 




L 


3 


DRDAR 








J 




UNSAV 


E 


9 


SLPR11 


M 


3 


DRDAR 








K 






F 


9 


SLPR11 


N 


13 


DRDAR 








L 




SLPCRF 


G 


9 


SLPR11 


B 


14 










N 




SLPCRF 


H 


9 


SLPR1 1 


c 


4 


DRDCP 








N 




SLPCRF 


1 


9 


SLPR11 


D 


U 


DRDCP 








B 






J 


9 


SLPR11 


E 


14 


DRDCP 








C 




CMPRS 


K 


9 


SLPR11 


F 


U 


DRDCP 








D 




CMPRS 


L 


9 


SLPR11 


G 


A 










E 




CMPRS 


M 


9 




H 


4 


DREIF 








F 




CMPRS 


N 


9 


SLPSB 


I 


14 


DREIF 








G 






B 


10 


SLPSB 


J 


4 


DREIF 








H 




ERSLP 


C 


10 


SLPSB 


K 


4 


DREIF 








I 




ERSLP 


D 


10 


SLPSB 


L 


4 


DREIF 









DRGSS MACRO Ml 108 H-OEC-77 19:58 PAGE 2 



1 

2 

3 

A 

5 

6 

7 

8 

9 
10 
11 
12 
13 
U 
'5 
16 
17 
18 
19 
20 
21 
22 
23 
2A 

25 000000 
26 
27 
28 
29 
30 
31 
32 
33 
3A 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 

W 

55 
56 
57 



.TITLE DRGSS 
.IDENT /03/ 



COPYRIGHT (C) 1974, 1976 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FUf IISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORD ^CE WITH THE TERMS OF SUCH LICENSE. 

VERSION 03 

D. N. CUTLER 31-AUG-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 

MODIFIED BY: 

MACRO LIBRARY CALLS 



.MCALL HWDDFS 
HWDDFS 



•»-$DRGSS-GET SENSE SWITCHES 



; DEFINE HARDWARE REGISTERS 



THIS DIRECTIVE INSTRUCTS THE SYSTEM TO STORE THE CONTENTS OF THE CONSOLE 
SWITCH REGISTER IN THE ISSUING TASK'S DIRECTIVE STATUS WORD. 

DPS FORMAT: 

WD. 00 — DIC(125.).DPB SIZEd.). 

INPUTS: 

R2«ADDRtSS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3«A0DRESS OF THE LAji WORD IN THE DPf-^?. 

R4'^ADDRESS OF THE HEADER OF THE CURRfNT TASK. 

R5«ADDRESS OF THE TCB OF THE CURREN* TASK. 



OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C«0 WrH A DIRECTIVE STATUS EQUAL TO THE CONTENTS C 
CONSOLE SWITCH REGISTER. 



THE 



.IF DF 

tDNGiS;:MOV 

RETURN 

.ENDC 



GtSTSS 
SWR,2(SP) 



;SET CONTENTS OF CONSOLE SWITCH REGISTER 
.•RETURN DIRECTIVE STATUS 



•••* § 1 ••«• 



DRGSS MACRO M1108 U-OFC-77 19:58 PAGE 2-1 



DRGSS MACRO MHOS U-OEC-77 19:58 PAGE 2-1 

59 000001 .END 



•••• c 1 **** 



DRGSS MACRO M1108 U-DtC-77 19:58 PAGF ?-? 



DRGSS MACRO MHOS 
SYMBOL TABLE 



1A-0EC-77 19:58 PAGE 2-2 



CStORE= 
FE.CAL= 
FE.CEX= 
FE.DRV= 
FE.EXP= 
FE.EXT= 
FE.EXV= 
FE.LSI= 
FE.MUP= 
FE.HXT- 



000^*00 
000040 
0?0000 
000010 
000200 
000001 
OOOOOA 
OOOAOO 
000002 
040000 



FE.NLG= 
FE.PICT= 
FE.PLA= 
H$$RTZ= 
IC$SCNT= 
KtSCSR= 
K»SIEN= 
K»$LDC= 
KS»TPS= 
MPAR = 



100000 
000130 
000020 
00007A 
1775A6 
1775A6 
000115 
000001 
00007A 
172100 



MPCSR = 1777A6 



nSSCRB^: 


0001 2A 


PIRQ = 


}77772 


PRO = 


000000 


PR1 = 


OOOOAO 


PRA = 


000200 


PR5 = 


0002A0 


PR6 = 


000300 


PR7 = 


0003A0 


PS 


177776 



R$$F11= 
R$SJP0= 
R»»JP1= 
R$$JS1= 
RSSK11: 
R«»P11= 
RSSX11= 
Rt$11M= 
RSSIIS^: 
SWR : 



000001 
000000 
000001 
000001 
000001 
000001 
OOCC'i 
CJOOOO 
000000 
177570 



S$$ECC= 
S»$YSZ= 
TPS = 
T$$A11^ 

T$$rii= 

T$$i16= 
T$$<CMG= 
T$$M11= 
V$$CTR= 



000000 
001000 
17756A 
000001 
000001 
000001 
000000 
000001 
OOOAOO 



. ABS. 000000 000 
000000 001 
tnRORS DETECTED: 

VIRTUAL MEMORY USED: 1728 WORDS ( 7 PAGES) 
DYNAMIC MEMORY: 157AA WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:08 
CA1.20]DRGSS.SY0:CA1.30]DRGSS/-SP=C1.nEXEMC/ML.LA1.10]RSXMC,C11.10]DR6SS 



tt*t D 1 •••• 



N ! % 




***• i y •••• 



OWTK MACRO M1108 U-DEC-77 19:58 PAGE? 



DRGTK MACRO M1108 U-DEC-77 19:58 PAGE 2 



30 000000 

31 000000 

32 000000 
33 



.TITLE DRGTK 
.IDENT /05/ 



COPYRIGHT (C) 1974. 1978 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS TURNISHED UNDER A LICENSE AND MA/ ONLY BE USED 
OR CUPIED IN ACCORDANCr WITH THE TERMS OF SUCH LICENSE. 

VERSION OS 

D. N. CUTLER 27-MAR-7A 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
T. J. MILLER 

MODIFIED BY: 

T. J. MILLER 2-NOV-77 

TM110 — RETURN PROTECTION UIC WORD. 

MACRO LIBRARY CALLS 

.MCALL HDRDFS.PCBDFS.TCBDFS 

HDRDFS .-DErlNE TASK HEADER OFFSETS 

PCBDFS .-DEFINE PARTITION CONTROL BLOCK OFFSETS 

TCBOFS .-DEFINE TASK CONTROL BLOCK OFFSETS 

♦*-$0RGTK-6ET TASK PARAMETERS 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO FILL A SIXTEEN WORD BUFFER WITH 
TASK PARAMETERS. 



DPB FORMAT: 

WD. 00 
WD. 01 



D1C(63.).DPB S1ZE(2.). 

ADDRESS OF A SIXTEEN WORD BUFFER. 



BUFFER FORMAT: 



WD. 00 

WO. 01 

WD. 04 

WD. 05 

WD. 06 

WD. 07 

WD. 10 



FIRST HALF OF ISSUING TASK'S NAME. 

SECOND HALF OF ISSUING TASK'S NAME. 

FIRST HALF OF TASK'S PARTITION NAME. 

SECOND HALF OF TASK'S PARTITION NAME. 

FIRST HALF OF , • f>: --^ER TASK NAME (NOT SUPPORTED). 

SECOND HALF OF REU TER TASK .«AME (NOT SUPPORTED), 

TASK PRIORITY. 

CURRENT TASK UIC. 

NUMBER OF LOGICAL UNITS. 

MACHINE TYPE INDICATOR (NOT SUPPORTEC). 

STD FLAGS WORD (NOT SUPPORTED). 



••*• f ] *««« 



DRGTK MACRO M1108 U-OEC-77 19:58 PAGE 2-1 



ORGTK MACRO M1108 U-DEC-77 19:58 PAGE 2-1 



58 
5« 
60 
61 
62 
63 
(A 
65 
66 
67 
68 
69 
70 
71 

» 

7« 
75 



79 
8C 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
91 
92 
95 
9A 
95 
96 
97 
98 
99 
100 
101 
1C2 
103 

108 
109 
110 
PI 
1'? 
113 
1U 



WD. 13 — ADDRESS OF TASK SST VECTOR TABLE. 

WO. U — SIZE OF TASK SST VECTOR TABLE IN WORDS. 

WD. 15 — SIZE OF TASK IN BYTES. 

WD. 16 — SYSTEM TYPE CODE. 

WD. 17 — PROTECTION UIC WORD. 

INPUTS: 

R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 
R3=ADDRESS OF THE SIXTEEN WORD BUFFER IN THE DP6. 
RA=ADDRESS OF THE HEADER OF THE CURRENT TASK. 
R5=ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C=0 WITH A DIRECTIVE STATUS OF +1. 



; TM110 
; TM110 
;»*-2 



;- 



.IF OF GSSTTK 
SDRGTK::MOV (R3).R3 

.IF DF ASSCHKinSSMGE 



MOV 
CALL 

.ENDC 



MOV 
MOV 
MOV 
MOV 
MOV 
CMP 
MOV 



#16.*2.R1 
»ACHKP 



;GET ADDRESS OF 16. WORD BUFFER 



;SET LENGTH OF BUFFER IN BYTES 
; ADDRESS CHECK PARAMETER BLOCK 



l.NAM(R5).(R3)» .-INSERT NAME OF TASK 

T.NAM*2(R$),(R3)* ; 

T.PCB(R5).R0 ;GET ADDRESS OF TASK PCB 

P.NAM(R0).(R3)» .-INSERT NAME OF PARTITION 

P.NAMt2(R0).<R3)* ; 

(R3)*,(R3)* .-POINT TO TASK PRIORITY ADDRESS 

T.PRI(R5),(h3)» ; INSERT TASK PRIORITY 



.IT DF MtSMUP 

MOV H.DUIC(R«).(R3)» .-INSERT DEFAULT UIC 

.IFF 

MOV H.CUIC(RA),(R3)» .-INSERT CURRENT UK 

.ENDC 



MOV H.NLUN(RA).(R3)« ;1NSERT NUMBER OF LUNS 

CMP (R3)*,(R3)t .-POINT TO TASK SST VECTOR ADDRESS 

MOV H.TKVA(RA;.(R3)» ,- insert TASK SST VECTOR ADDRESS 

MOV h.tkvl(RA),(R5) .-Insert length of sst vector in words 

ASR (R3)^ .-C0NVER1 TO LENGTH IN WORDS 



•••• G 1 «•«• 



DRC.1K MACR" Ml 108 U-DEC-77 1«>:58 PAGE 2-2 



DRGTK MACRf^ Ml 108 U-OEC-77 19:58 PAGE 2-2 

115 MOV H.UND(RA).R1 .-POINT TO NUMBER OF WINDOW BLOCKS 

116 MOV W.BHVR*2(R1).(R3) ;CALCULATE TASK SIZE IN BYTES 

117 SUB W.8LVR»2(R1),(R3) ; 

118 INC (H3;* 
119 

120 

121 .IF NDF RS$11S 

122 

123 MOV #1.(R3)* .-SET CODE FOR RSX-11M ; TM110 

12A ;*»-1 

125 .IF? 

126 

127 MOV #2.(R3)* ;SET CODE FOR RSX-IIS ; TM110 

1?8 ;**-1 

1c9 . .ENDC 

130 

131 

152 MOV H.CUIC(R4),(R3) .-RETURN PROTECTION UIC .- TM110 

133 RETURN ; 

134 

135 .ENDC 

1?6 

137 

138 000001 .END 



••t* H 1 *••• 



OWiTfc MACRO M1108 U-OEC-77 19:58 PAGE 2-5 

(VMBn TAAIF 



DRGTK 


MACRO mi08 


-DEC-77 


19:58 PAGE 2-3 




SYmn. 


TABLE 








AS.DEL= 


000010 


H.OOVA 


000022 


P. IOC 


AS.EXT-- 


000004 


H.ODVL 


000024 


P.LNK 


AS.REO= 


000001 


H.OVLY 


000054 


P.NAIN 


AS.URT= 


000002 


H.PFVA 


000032 


P.NAM 


A. IOC 


000003 


H.RCVA 


000036 


P. OWN 


A.LGTH= 


OOOOU 


H.RRVA 


000062 


P.PRI 


A.MPCT 


000011 


H.SPRI 


000060 


P.REL 


A.PCB 


000012 


H.TKVA 


000026 


P.SIZE 


A.PCBL 


000000 


H.TKVL 


000030 


P.STAT 


A.PRl 


000002 


H.VEXT 


000056 


P. SUB 


A.STAT 


000010 


H.WND 


000044 


p.sysz 


A.TCB 


000004 


KSSCNTr 


177346 


P.TCB 


A.TCBL 


000006 


KMCSRs 


177546 


P. WAIT 


C»$ORF» 


OOOAOO 


KSSIEN- 


000115 


RSSFII^ 


H»WT2= 


000074 


KSSLDC= 


000001 


R»$JPO= 


H.CSP 


000000 


K$$TPS= 


000074 


R$fJP1= 


H.CUIC 


000010 


mSCRB^ 


000124 


RSSJSI' 


H.DSW 


000046 


PS.APR= 


000007 


RS«C11 = 


H.DUIC 


000012 


PS.CHK= 


010000 


R$$P11= 


H.EFLH 


000004 


ps.crp« 


040000 


R$SX11> 


H.EFSV 


000040 


PS.CKRs 


020000 


RSS1in« 


H.FCS 


000050 


PS.COM= 000200 


RtS11S» 


H.FORT 


000052 


Pi.-)EL» 


000010 


SI$ECC= 


H.FPSA 


000042 


PS.DRV= 


000020 


SS$YSZ= 


H.FPVA 


000034 


PS.FXO* 


004000 


TS.BLK^ 


H.GARi) 


000072 


PS.LlOs 


001000 


TS.CICP= 


H.HOLN 


000002 


PS.NSFr 


000400 


TS.CKRs 


H.IPC 


000016 


PS.OUT« 


100000 


TS.EXE= 


H.IPS 


000014 


PS.PER= 


002000 


TS.MSG= 


H.ISP 


000020 


PS.PICs 


000100 


TS.NRP= 


H.LUN 


000076 


PS.SYS» 


OC0040 


TS.OUT= 


H.NLUN 


000074 


P.BLKS 


000016 


TS.RDN= 


H.m. 


000061 


P.BUSY 


000024 


TS.RUN= 


. ABS. 


000102 000 
000000 001 








ERRORS DETECTED: 









000003 


TWA11 = 


000001 


T2.CHIC= 


000000 


T$$C11= 


000001 


T2.CKD= 


00C012 


TMJ16= 


000001 


T2.DST= 


000004 


T$$KMG= 


000000 


T2.FXD= 


000026 


TS$M11= 


000001 


T2.HLT= 


000002 


T.ACTL 


000052 


T2.SPN= 


000014 


T.ASTL 


000016 


T2:.STP= 


000016 


T.ATT 


000054 


T2.TI0= 


000030 


T.CPCB 


000004 


T2.WFR= 


000010 


T.OPRI 


000040 


T3.ACP= 


000022 


T.EFLG 


000022 


T5.CAL= 


000026 


T.IOC 


000003 


T3.CLI= 


000020 


T.LBN 


000041 


T3.MCR* 


000001 


T.LDV 


0-^0044 


T3.NET= 


000000 


T.LNK 


000000 


T3.NSD- 


000001 


T.NXSZ 


000050 


T3.PM0= 


000001 


T.NAM 


000006 


T3.PRV= 


000001 


T.OFF 


000060 


T3.REM* 


000001 


T.PCB 


000046 


T3.R0V= 


000001 


T.PRI 


000002 


T3.RST= 


000000 


T.RCVL 


000012 


T3.SLV= 


000000 


T.RRFL 


000064 


V$$CTR= 


000000 


T.SRCT 


000063 


W.BATT 


001000 


T.STAT 


000032 


W.BFPD 


170700 


T.ST2 


000034 


W.BHVR 


000200 


T.ST3 


000036 


W.BLGH 


000100 


T.TC8I. 


000030 


W.BLPD 


100000 


T.UCB 


000026 


W.BLVR 


020000 


T2.AB0= 


000100 


W.BNPD 


010000 


T2.ASTS 


100000 


W.BOFF 


000400 


r2.BFX= 


004000 


W.BPCB 


040000 


12.CAF= 


000400 


w.Bsi; 


004000 









020000 
010000 
040000 
002000 
000200 
000004 
000020 
001000 
000001 
100000 
000100 
001000 
004000 
000020 
000200 
040000 
010000 
020000 
000040 
000400 
002000 
000400 
000006 
000014 
000004 
000020 
000016 
000002 
000015 
000012 
000000 
000010 



VIRTUAL MEMORY USED: 3393 WORDS ( 14 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:12 
C41.203ORGTK.Sr0:C41.301DRGTK/-SP=C1.nEXEMC/ML.[41.10]RSXMC.[1M0]0RGTK 



•••• I \ «t«« 



N ! '• 




•••• J \ *«*t 



CROIP »*ACHOmi08 U-OIC-77 19:58 PAGE 2 



DRGTP MACRO Ml 108 U-OEC-77 19:58 PAGE 2 



4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
1A 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 



54 
55 
56 

57 



.TITLE DRGTP 
. I DENT /03/ 



COPYRIGHT (C) 1974, 1976 

DIGITAL EQUIPMENT CORPORATIOf^, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 03 

D. N. CUTLER 30-AUG-73 

PREVIOUSLY MODIFIED BY: 



N. CUTLER 
J. MILLER 



MODIFIED BY: 



**-»DRGTP-6ET TIME PARAMETERS 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO FILL A SPECIFIED EIGHT WORD 
BUFFER WITH THE CURRENT TIME PARAMETERS. 



DPB FORMAT: 

WD. 
WO. 



00 — 0IC(61.).DPB SIZE(2.). 

01 — ADDRESS OF AN EIGHT WORD BUFFER. 



BUFFER FORMAT: 



WD. 00 -- 

WD. 01 - 

WD. 02 -- 

WD. 03 -- 

WD. 04 - 

WD. 05 -- 

WD. 06 -- 

WD. 07 - 



YEAR SINCE 1900. 
MONTH OF YEAR. 
DAY OF MONTH. 
HOUR OF DAY. 
MINUTE OF HOUR. 
SECOND OF MINUTE. 
TICK OF SECOND. 
TICKS PER SECOND. 



INPUTS: 



R2=A00RESS OF THE TASK STATUS W^RO OF THE CURRENT TASK. 

; R3=ADDPESS OF THE SECOND WORD IN THE DPS. 

; R4cADDRESS OF THE HEADER OF THE CURRENT TASK. 

RS'ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C«0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF *\ IS RETURNED. 
C"1 IF DIRECTIVE IS REIECTED. 

DIRECTIVE STATUS 0» 'D.RS98' IS RETURNED !f BUFFER IS 
OUTSIDE or ISSUING TASK'S ADDRESS SPACE. 



•••* K y •••* 



DRGIP MACRO M1108 14-0tC-77 19:58 PAGE 2-1 



DRGTP MACRO Hi 108 U-OEC-77 19:58 PAGE 2-1 



58 

59 
60 
61 
62 
63 
6A 
65 
66 
67 
66 
69 
TV 
71 
72 
71 
7A 
75 
76 
77 
78 



000000 011303 



$DRGTP::M0V 



(R3).R3 



.IF DF ASSCHKiMSSMGE 



MOV 
CALL 

oENDC 



#8.«2.R1 
SACHKP 



000002 012701 17776A6 

000006 0I21?3 

000010 C20127 OOOOOOG 

OOOOU 10177A 

00001 C 016713 OOOOOOG 

000022 

000001 



lOtt 



NOV 


#STTNS-U.R1 


HDV 


(R1)*.(R3)» 


CMP 


Rl.nTTNS 


BIOS 


10S 


HOV 


$TKPS.(R3) 


RETURN 





.GET ADDRESS OF TIME PARAMETERS BUFFER 



:SET LENGTH OF BUFFER IN BYTES 
.ADDRESS CHECK PARAMETER BUFFER 



POINT TO CURRENT TIME VECTOR 

INSERT TIME PARAMETER IN TASK BUFFER 

ANY MORE TO INSERT? 

IF LOS YES 

SET TICKS PER SECOND 

RETURN DIRECTIVE STATUS OF ♦! 



.END 



•••• L. 1 •••• 



DRGTP 
SYD 



MACRO Ml 108 
TABLE 



H-DtC-77 19:58 PAGE 2-2 



ORGTP MACRO HI 108 U-DEC-77 19:58 PAGE 2-2 
SYMBOL TABLE 



IC$»TPS= 000074 
MtSCRB= 0001 2A 
R$SF11= 000001 
RttJPO^ 000000 
R»»JP1= CO'" "01 
R»$JS1= OOOo. 



RSSKll:: 000001 
RS$P11= 000001 
RSSXII^ 000001 
R$S11M= 000000 
RSS11S= 000000 
S$$ECC= 000000 



CttORE= 000<i00 
HtSRTZ^ 000074 
K»»CNT= 177546 
atCSR= 1775A6 
K»»IEN= 000115 
K»tLDC= 000001 

. ABS. 000000 000 
000024 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 1156 yORDS ( 5 PAGES) 
DYNAMIC MEMORY: 157AA WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:08 
[41.20]DRGTP.SYO:CA1,30:DR6TP/-SP=[1.1:EXEHC/ML.C41.10]RSXMC.C11.10]DRGTP 



S*$YSZ= C01000 

T$$A11= 000001 

T»K11= 000001 

T$»J16^ 000001 

TSSKMG= 000000 



T$$M11 = 
V$»CTR= 
SDRGTP 
STKPS = 



000001 
000400 
OOOOOORG 
GX 



$TTNS = *•••♦♦ GX 



*••• M 1 •••• 



[ 



N ! V 




y **t* 



DRMAP M.\CRO Ml 108 U-DEC-77 19:58 PAGE 2 



.TITLE DRMAP 
•It-NT /01/ 



COPYRIGHT 'O 1976, 1978 

DIGITAL EQUIPMENT CORPORATION. MAYNARD. MASS. 

THIS SOFTUAF^E IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERS I "^1 n 

T. J. ilILLER 8-MAR-76 

MODIFIED BY: 

T. J. MILLER 5-JAN-77 

TM071 — CORRECT ERROR IN MAP ALGORITHM. 

T. J. MILLER 20-APR-77 

TM076 — CORRECT BUG IN GET MAPPING CONTEXT DIRECTIVE. 

^ J. MiLLER 26-MAY-77 

TM086 — UTILIZE COMMON EVENT FLAG SETTING ROUTINE IN 
RECEIVE BY REFERENCE. 



•••• § 2 *••* 



r 



hMtAD MArftn Mima u.ni:r.77 lOtfl pagi 1 



DRMAP MACRO M1108 U-OEC-77 19:58 PAGE 3 



THE FOLLOWING OIREf^ ES RECEIVE AS INPUT POINTERS TO A WINDOW DEFINITION 
BLOCK, WHICH SERVE A COMMUNICATION AREA BETWEEN THE ISSUING TASK AND 
THE EXECUTIVE. THE ^ORMAT OF THE WINDOW DEFINITION BLOCK IS: 



W.NID 
W.NAPR 



W.NBAS 



W.NSIZ 



W.NRID 



W.NOFF 



W.NLEN 



W.NSTS 



W.NSRB 



BASE APR 



WINDOW ID 



VIRTUAL BASE ADDRESS (BlTTES) 



WINDOW SIZE (32W BLOCKS) 



REGION ID 



OFFSET IN PARTITION (32W BLOCKS) 



LENGTH TO MAP (32W BLOCKS) 



STATUS WORD 



SEND/RECEIVE BUFFER ADDN (BYTES) 



MACRO LIBRARY CALLS 



.IF DF PS*LAS 

.MIALL HDRDFS.PCBDFS,TCBDFt,WDBDFS 

HDROFl ;D£FINt HEADER ANt> WINDOW BLOCK OFFSETS 

PCBOFf ;DEf!NE PCB AND ATTACHMEM DESCR OFFSETS 

fCBDFS ;DEf INE TCb OFFSETS 

WDBCFS .-DEFINE WINDOW DEFINITION BLOCK OFFSETS 

•*-$DRCRW-CREATt ADDRESS WINDOW 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO ALLOCATE AN ADDRESS W NOOW IN THE 
HEADfR OF THf ISSUING TASK, UNMAPPING AND ELIMINATING ANY OviHLAPPlNG 
ADDRESS WINDOWS, AND OPTIONALLY TO MAP THE NEW WINDOW. 



*«•• c 2 ***• 



nbMAD MArnn Miinn u.t)rr>77 IQ-^I pagf 1-1 



1 



DRMAP MACRO M1108 U-DEC-77 19:58 PAGE 3-1 



L 



100 
101 
102 
103 
10A 
105 
106 
107 
108 
109 
110 
111 
112 
113 
1U 
115 
116 
117 
118 
119 
120 
121 
122 
123 
12A 
125 
126 
127 
128 
\29 
130 
151 
132 
133 
13* 
135 
136 
137 
138 
139 
UO 
U1 
U2 
U3 



DPB FORMAT: 



WD. 00 — Dir(117,),0PB S1ZE(2.) 

WD. 01 — ADDRESS OF WINDOW DEFINITION BLOCK 

INPUTS: 

R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3-ADDRESS OF THE WINDOW DEFINITION BLOCK. 

RAsADDRESS OF THE HEADER OF THE CURRENT TASK. 

R5=ADDRESS OF THE TCB OF THE CURRENT TASK. 

INPUT FIELDS IN THE WINDOW DEFINITION BLOCK ARE: 
W.NAPRbBASE APR OF REGION. 
W.NSIZ-DESIRED SIZE OF ADDRESS WINDOW. 

W.NRID'ID OF REGION TO MAP OR FOR TASK REGION (IF WS.MAP^I). 
W.NOFF»OFFSET WITHIN REGION TO MAP (IF WS.MAP=1). 
W.NLEN-LENGTH TO MAP OR TO DEFAULT TO SMALLER OF WINDOW SIZE 

OR SIZE LEFT IN PARTITION (IF WS.MAP-D. 
W.NSTS^CONTROL rNFORMATION. 

WS.MAP«1 IF MAPPING IS TO OCCUR. 

WS.WRTsI IF MAPPING IS TO OCCUR WITH WRITE ACCESS. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF *} IS RETURNED. 
C«1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF •D.RS16' IS RETURNED IF THE SPECIFIED 
ACCESS IS DENIED IN THE MAPPING STAGE. 

DIRECTIVE STATUS OF 'D.RS84' IS RETURNED IF AN INVALID APR- 
WINDOW SIZE COMBINATION IS SPECIFIED OR IF AN 
INVALID REGION OFFSET-LENGTH COMBINATION IS SPECIFIED 
IN THE MAPPING STAGE. 

DIRECTIVE STATUS OF 'D.RS85' IS RETURNED IF THERE ARE NO 
AVAILABLE WINDOW Bl.OCKS. 

DIRECTIVE STATUS OF 'D.RS86' IS RETURNED IF AN INVALID REGION 
ID IS SPECIFIED IN THE MAPPING STAGE. 

OUTPUT FIELDS IN THE WINDOW DEFINITION BLOCK ARE: 
W.NID'ASSIGNED WINDOW ID. 
W.NBAS«VIRTUAL BASE ADDRESS OF WINDOW. 
W.NLEN'LENGTH ACTUALLY MAPPED. 
W.NSTS»INDICATION OF ANY CHANGES IN MAPPING STATUS. 

WS.CRW<1 IF ADDRESS WINDOW SUCCESSFULLY ESTABLISHED. 

WS.ELW'1 IF ANY ADDRESS WINDOWS WERE ELIMINATED. 

WS.UNM'1 IF ANY ADDRESS WINDOWS WERE UNMAPPED. 



.•SAVE ADDRESS OF TASK HEADER 

; POINT TO NUMBER OF WINDOW BLOCKS 

;PICK UP NUMBER OF WINDOW BLOCKS 

.'PICK UP APR NUMBER IN HIGH BYTE (W.NtD) 

.•CLEmR OUT LOW BYTE 

.-LEGAL APR NUMBER? 

;1F HI NO 



SDJ.'CRW: 


:MOV 


R4,-(SP) 




MOV 


H.WND(R4).R<i 




MOV 


(R4)».R1 




MOV 


(R3)»,R2 




CLRB 


H 




CMP 


R2,*7»256. 




BHI 


40i 



**t* D 2 **** 



DRMAP It'iACRO M1108 U-DEC-/7 19:58 PAGE 3-2 



DRMAP rJkCRO mi 08 U-OEC-77 19:58 PAGE 3-2 



U5 
H6 
H7 
U8 
1A9 
150 
151 
152 
153 
15A 
155 
156 
157 
158 
159 
160 
161 
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 
172 
173 
'7A 
175 
176 
177 
178 
179 
180 
181 
182 
183 
184 
185 
186 
187 
188 
189 
190 
191 
192 
193 
194 
195 
196 
197 
198 
199 



10$: 



20S: 



30S: 



40$: 
50$: 



ASR 

MOV 

ASR 

ASR 

SWAB 

MOV 

ADD 

BCS 

CMP 

BHI 

MOV 

CMP 

TST 

BEQ 

MOV 

SWAB 

ASL 

ASL 

CMP 

BLOS 

ADD 

CMP 

BHIS 

CMP 

BEQ 

CALL 

TST 

BEQ 

CMP 

MOV 

MOV 

MOVB 

ASL 

ADD 

MOVB 

MOVB 

SUB 

CLR 

ADD 

DEC 

BGT 

TST 

»X 

TST 

MOV 

BIS 

BIT 

BNE 

RETURN 

DRSTS 

DRSTS 



R2 


CONVERT TO BASE ADDRESS IN 3?W BLOCKS 


R2,(R3) 
(R3) 
(R3) 
(R3)t 


STORE VIRTUAL BASE ADDRESS (W.NBAS) 


■CONVERT TO BYTES (W.NBAS) 




R2,-{SP) 
(R3).(SP) 


■CALCULATE HIGH ADDRESS 


■(W.NSIZ) 


40$ 


IF CS ILLEGAL SIZE 


(SP),/r2000 


■LEGAL TOP ADDRESS? 


40$ 


IF HI NO 


R1,-(SP) 


SAVE NUMBER OF WINDOWS 


-(R3).-(R3) 


POINT TO START OF WINDOW BLOCK (W.NBAS) (W.NID) 


W.BSIZ(R4} 


POINTING TO AN ESTABLISHED ADDRESS WINDOW? 


20$ 


IF EQ NO 


W.BLVR(R4).R0 


PICK UP LOW VIRTUAL ADDRESS 


RO 
RO 


■CONVERT TO 32W BLOCKS 


RO 
2(SP),R0 


■POSSIBLE VIRTUAL ADDRESS OVERLAP? 


30$ 


■IF LOS NO 


W.BSIZ(R4),R0 


■CALCULATE HIGH ADDRESS 


R2,R0 


VIRTUAL ADDRESS OVERLAP? 


30$ 


■IF HIS NO 


RI.(SP) 


■OVERLAPPING WINDOW 0? 


40$ 


■IF EQ YES 


ELAW 


•ELIMINATE ADDRESS WINDOW 


(SP) 


■HAS A WINDOW BEEN ESTABLISHED? 


30$ 


IF EQ YES 


(R3)+,(R3)* 


■POINT TO WINDOW SIZE IN BLOCK (W.NID) (W.NBAS) 


(R3},W.BSIZ(R4) 


STORE SIZE, ESTABLISHING WINDOW (W.NSIZ) 


-(R3).W.BLVR(R4) 


;SET LOW VIRTUAL ADDRESS (W.NBAS) 


-<R3).R0 


PICK UP FIRST APR NUMBER (W.NAPR) 


RO 


CONVERT APR NUMBER TO WORD OFFSET 


«UISDR0,R0 


POINT TO FIRST PDR 


R0.W.BFPD(R4) 


SET FIRST PDR ADDRESS 


(SP).-(R3) 


PICK \}P TOTAL NUMBER OF WINDOWS (W.NID) 


R1,(R3) 


SET ADDRESS WINDOW ID (W.^T; 


(SP) 


INDICATE WINDOW HAS BEEN ESTABLISHED 


«W.BLGH.R4 


POINT TO NEXT WINDOW BLOCK 


R1 


MORE WINDOW BLOCKS? 


10$ 


IF GT YES 


(SP)* 


WAS AN ADDRESS WINDOW ESTABLISHED? 


50$ 


IF NE NO 


(SP)* 


POP CALCULATED HIGH ADDRESS 


(SP)*,R4 , 
«WS.CRW.W.NSTS(R* 


■RESTORE TASK HEADER ADDRESS 


1) .'INDICATE ADDRESS WINDOW WAS CREATED 


#WS.MAP,W.NSTS(H! 


J) ;IS WINDOW TO BE M/».PPED? 
MAP ADDRESS WINDOW AND EXIT 


$DRMAP 


D.RS84 
D.RS85 


ALIGNMENT ERROR 


NO AVAILABLE WINDOWS 



••-$DRELW-ELIM1NATF ADDRESS WINDOW 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO ELIMINATE THE SPtCIFlED ADDRESS 
WINDOW. UNMAPPING IT FIRST IF NECESSARY. 



*••• E 2 **** 



r^RMAP MACRO M1108 U-OEC-77 19:58 PAGE 3-3 



DRMAP MACRO Ml 108 A-DEC-77 19:58 PAGE 3-3 



202 
203 
20A 
205 
206 
207 
208 
209 
210 
211 
212 
213 
21A 
215 
216 
217 
218 
219 
220 
221 
222 
223 
22A 
225 
226 
227 
228 
229 
230 
231 
232 
233 
234 
235 
236 
237 
238 
239 
240 
241 
242 
243 
244 
245 
246 
247 
248 
249 
250 
251 
252 

i\^ 

?54 

?55 



DPB FORMAT: 



WD. 00 — DIC(119.).DPB S1ZE(2.) 

WD. 01 — ADDRESS OF WINDOW DEFINITION BLOCK 

INPUTS: 

R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3=ADDRESS OF THE WINDOW DEFINITION BLOCK. 

R4=ADDRESS OF THE ;<EADER OF THE CURRENT TASK. 

R5=ADDRESS OF THE TCB OF THE CURRENT TASK, 

INPUT FIELDS IN THE WINDOW DEFINITION BLOCK ARE: 
W.NID^ID OF ADDRESS WINDOW TO ELIMINATE. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C«0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF ♦! IS RETURNED, 
C=1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF •D.RS87' IS RETURNED IF AN INVALID 
ADDRESS WINDOW WAS SPECIFIED. 

OUTPUT FIELDS IN THE WINDOW DEFINITION BLOCK ARE: 

W.NSTS-INDICATI'jN of any changes in mapping STATUS. 

ws.:lw<i if address window successfully eliminated. 
ws.unm'1 if the address window was unmapped. 



SSRWNO .'SEARCH FOR AND VERIFY SPECIFIED WINDOW 
SUNMAP :UNMAP IF NECESSARY 
10S ;IF CC UNMAPPING WAS NOT PERFORMED 

#WS.UNM,W.NSTS(R3) .-INDICATE A WINDC ' WAS UNMAPPED 
W.BSIZ(R4) INDICATE ADDRESS WINDOW IS ELIMINATED 
«WS.ELW,W.NSTS(R3) .'INDICATE ADDRESS WINDOW ELIMINATED 



SDRELW: 


:CALL 


ELAW: 


CALL 




BCC 




BIS 


10S: 


CLR 




BIS 



RETURN 



**-$DRMAP-MAP WINDOW TO REGION 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO MAP THE SPECIFIED ADDRESS 
WINDOW TO AN OFFSET IN THE SPECIFIED REGION. UNMAPPING IF NECESSARY. 

DPB FORMAT: 

WD. 00 — DICdi'D.DPB SIZE(2.) 

WD. 01 — ADDRFS' OF WINDOW DEFINITION BLOCK 



INPUTS: 

R 
P 



2-ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

3=ADDRESS OF THE WINDOW DEFINITION BLOCK. 

R4«ADDRESS OF THE HEADER OF THE CURRENT TASK. 

R5«ADDRESS OF THE TCB OF THE CURRENT TASK. 

INPUT FIELDS IN THE WINDOW DEFINITION BLOCK ARE: 



•*•« f 2 **** 



DRMAP MACRO H1 108 14-DEC-77 19:51 PAGE 3-4 



ORMAP MACRO Ml 108 U-DEC-77 19:58 PAGE 3-4 



259 

260 

261 

262 

263 

26A 

265 

266 

267 

268 

269 

<:70 

271 

272 

273 

274 

275 

276 

277 

278 

279 

280 

281 

282 

283 

284 

285 

286 

287 

288 

289 

290 

291 

292 

293 

294 

295 

296 

297 

298 

299 

300 

301 

302 

303 

304 

305 

306 

307 

308 

309 



51? 

314 
315 



W.NID^rlD OF WINDOW TO MAP. 

W.NRID=IO OF REGION TO MAP TO OR TO DEFAULT TO TASK REGION. 

W.NOFF=OFFSET WITHIN REGION TO MAP TO. 

W.NLEN=LENGTH TO MAP OR TO DEFAULT TO SMALLER OF WINDOW 

SIZE OR SIZE LEFT IN PARTITION. 
W.NSTS=CONTROL INFORMATION. 

WS.WRT=1 IF WRITE ACCESS IS DESIRED. 



OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 
DIRECTIVE STATUS OF t1 IS RETURNED. 
C=1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RSU* IS RETURNED IF THE DESIRED 

ACCESS TO THE REGION !S DENIED. 
DIRECTIVE STATUS OF •D.RS84* IS RETURNED IF AN INVALID 

REGION OFFSET-SIZE COMBIN^.TION IS SPECIFIED. 
DIRECTIVE STATUS OF •0.RS86' IS RETURNED IF AN INVALID 

REGION ID IS SPECIFIED. 
DIRECTIVE STATUS OF •D.RS87' IS RETURNED IF AN INVALID 

ADDRESS WINDOW ID IS SPECIFIED. 

OUTPUT FIELDS IN THE WINDOW DEFINITION BLOCK ARE: 
W.NLEN«LENGTH ACTUALLY MAPPED. 

W.NSTSsINDICATION OF ANY CHANGES IN MAPPING STATUS. 
WS.UNM'1 IF THE WINDOW WAS UNMAPPED FIRST. 

THIS DIRECTIVE FIRST BUILDS AN IMAGE OF A MAPPED WINDOW BLOCK ON THE 
STACK. THEN IF NO ERRORS ARE ENCOUNTERED. THE CORRESPONDING WINDOW IS 
UNMAPPED. IF NECESSARY. AND SET UP FROM THE STACK IMAGE. 



$DRMAP::CALL 
ADD 
CALL 
NOV 



20t; 



SSRWND 

«W.NRID.R3 

ISRATT 

A.PCB(R5).R2 

R2,-(SP) 

W.BLVR(R4).-( 

(R3)» 

(R3)*,R0 

RO.P.SIZE(R<J) 

70i 

(R3).R1 

20S 

P.SIZE(R2).R1 

R0.R1 

R1.W.BSIZ(R4) 

20i 

W.BSIZ(R4).R1 

R1.(R3)* 

R1, -(SP) 

(SP) 

(SP) 

(SP) 

(SP) 

(SP) 

?(SP).(SP) 



.■SEARCH FOR AND VERIFY ADDRESS WINDOW ID 
.•POINT TO SPECIFIED REGION ID 
.•SEARCH FOR MATCHING ATTACHMENT DESCRIPTOR 
.•POINT TO ATTACHED PCB 
;SET PCB ADDRESS (W.BPCB) 
SP) ;COPY LOW VIRTUAL ADDRESS (W.BLVR) 
.-POINT TO OFFSET (W.NRJD) 
.•PICK 'JP SPECIFIED OFFSET (W.NOFM 
;WITHIN PARTITION? 
* 1 F HIS NO 

.•HICK UP LENGTH TO MAP (W.NLEN) 
.'IF NE ONE WAS SPECIFIED 
.•CALCULATE SIZE TO END OF PARTITION 

;SIZE TO END GREATER THAN WINDOW SIZE? (W.BSIZ) 

:IF LOS NO 

.•DEFAULT TO WINDOW SIZE (W.BSIZ) 

.-PASS BACK SIZE USED (W.NLEN) 

.■CALCULATE HIGH VIRTUAL ADDRESS (W.BHVR) 

.•MULTIPLY BY 64 



.'POINT TO LAST ADDRESSABLE BYTE 



*••• G 2 *••• 



r 



ORMAP MCROM1108 U-DIC-77 17:58 PAGE 3-5 



DRMAP MCRO Ml 108 U-OEC-77 19:58 PAGE 3-5 



316 

317 

318 

319 

320 

321 

322 

323 

324 30t: 

325 

326 

327 

328 

329 

330 

331 

332 

333 

334 

335 

336 

337 40S: 

338 

339 

340 

3A1 45S: 

342 

343 

344 

SI 50.. 

347 

348 

3/.9 

350 

351 

352 

353 

354 

355 

356 

357 60lt 

358 

359 

360 

361 



364 
365 
366 

367 
368 
369 
370 

r^ 

572 



n: 



MOV 



CMP 

SHI 

RETURN 
DRSTS 
DRSTS 



R5,-(SP; .STORE ADOR OF ATTACHMENT DESCRIPTOR (W.BATT) 

W.BSIZ(R4),-(SP) .-COPY WINDOW SIZE (W.BSIZ) 

R1,(SP) ;LEGAL SIZE? (W.BSIZ) 

70$ ;If HI NO 

*7,R0 ;64-BYTE ALIGNMENT? 

30$ ;IF EQ NO 

#WS.64B.(R3) ;64-BYTE ALIGNMENT BEING ALLOWED? 

70$ ;1F CQ NO 

RO,-(SP) ;SET OFFSET IN PARTITION (W.80FF) 

R1.R0 .-POINT PAST LAST 32W BLOCK MAPPED TO 

R0.P.SIZE(R2) .'WITHIN PARTITION? 

70$ ; IF HI NO 

W.BFPD(R4),-(S'») .-SAVE FIRST PDR ADDRESS (W.BFPD) 

#AS.RED!AS.WRT,A.STAT(R5) .-READ ACCESS ALLOWED? 



80$ 

#77402,- (SP) 
«WS.WRT.(R3) 
40$ 



IF NE NO 

SET FOR READ ACCESS. 4K SIZE (W.8LPD) 

WRITE ACCESS DESIRED? (W.NSTS) 

IF EQ NO 



#AS.WRT.A.STAT(R|) ;WRITE ACCESS ALLOWED? 



80$ 

#77406. (SP) 

A.MPCT(R5) 

$UNMAP 

45$ 

#WS.UNM.(R3) 

W.BFPD(R4).R0 

P.REL(R2).R2 

4(SP).R2 

3(SP) 

3(SP; 



' IF NE NO 

•SET FOR 4K SIZE, READ/WRITE ACCESS (W.BLPD) 

;INC MAP COUNT IN ATTACHMENT DESCRIPTOR 

.■UNMAP WINDOW IF NECESSARY 

;IF CC WINDOW WAS NOT MAPPED 

.•INDICATE A WINDOW WAS UNMAPPED (W.NSTS) 

; POINT TO FIRST PDR 

; CALCULATE OFFSET FOR FIRST PDR 

.-(W.BOFF) 

;INIT NUMBER OF PDR'S (W.BNPD) 

;INC NUMBER OF PDR'S (W.BNPD) 



R2.UISAR0-UISDR0(R0) ;SET UP USER APR 



(St»).(R0)* 

#200.R2 

»'200.R1 

50$ 

R1 

R1 

RI.(SP) 

RI.-(RO) 

R4.R3 

#W.BLGH.R3 

(SP)*,-(R3) 

R3.R4 

60$ 

D.RSB4 
D.RS16 



SET UP NEXT USER PDR 

ADVANCE APR OFFSET 

DONE YET? 

IF GT NO 

SHIFT UNUSED SIZE TO HIGH BYTE 

CLEAR LOW BYTE 

CALCULATE SIZE IN LAST PDR 

SET LAST PDR 

COPY POINTER TO WINDOW BLOCK 

POINT PAST END OF WINDOW BLOCK 

COPY IMAGE OF WINDOW BLOCK INTO REAL BLOCK 

DONE YET? 

IF HI NO 

INVALID OFFSET-LENGTH COMBINATION 
DESIRED ACCESS TO REGION DENIED 



TM071 



**-$DRUNM-UNMAP ADDRESS WINDOW 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO UNMAP THE SPECIFIED ADDRESS 
WINDOW. 

DPS FORMAT: 

WD. 00 - DIC(1?3.).DPB SIZE(2.) 



•••• H 2 •••• 



DRMAP MACRO MIIOB 14-DEC-77 19:58 PAGE 3-6 



DRMAP MACRO Ml 108 U-OEC-77 19:58 PAGE 3-6 



373 
37A 
375 
376 
377 
378 
379 
380 
381 
382 
383 
3M 
385 
386 
2?7 
388 
389 
390 
391 
392 
393 
394 
395 
396 
397 
398 
399 
400 
401 
402 
403 
404 
405 
406 
407 
408 
409 
410 
411 
412 
413 
414 
415 
416 
417 
418 
419 
420 
421 
422 
42! 
424 
425 
426 
427 
428 
429 



WD. 01 — ADDRESS OF WINDOW DEFINITION BLOCK 

INPUTS: 

R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 
R3=ADDRESS OF THE WINDOW DEFINITION BLOCK. 
R4=ADDRES5 OF THE HEADER OF THE CURRENT TASK. 
R5=ADDRESS OF THE TCB OF THE CURRENT TASK. 

INPUT FIELDS IN THE WIWOW DEF'NITION BLOCK ARE: 
W.NID-ID OF WINDOW TO mMAP. 

OUTPUTS: (DIRECTIVE STATUS AND PS WORD RETURNED TO TASK) 

C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 
DIRECTIVE STATUS OF tl IS RETURNED. 
C=1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RS8' IS RETURNED IF THE SPECIFIED 

ADDRESS WINDOW NOT MAPPED. 
DIRECTIVE STATUS OF 'D.RS87' IS RETURNED IF AN INVALID 
ADDRESS WINDOW ID IS SPECIFIED. 

OUTPUT FIELDS IN THE WINDOW DEFINITION BLOCK ARE: 

W.NSTS=INDICATION OF ANY CHANGES IN MAPPING STATUS. 

WS.UNM=1 IF THE WINDOW WAS SUCCESSFULLY UNMAPPED. 



; 
; 
; 
; 
; 
; 
; 

SDRUNM: 



IMi 



iCALL 
CALL 

see 

BIS 

RETURN 
DRSTS 



tSRWND ; SEARCH FOR AND VERIFY WINDOW ID 
SUNMAP :UNMAP IF NECESSARY 
IDS :IF CC WINDOW WAS NOT MAPPED 

#WS.UNM.W.NSTS(R3) INDICATE ADDRESS WINDOW WAS UNMAPPED 



D.RS8 



.'ADDRESS WINDOW WAS NOT MAPPED 



;♦ 



••-IDRSRF-SEND BY REFERENCE 



THIS DIRECTIVE INSTRUCTS THE SYSTEM TO CREATE A SPECIALLY FORMATTED 
PACKET INCLUDING A REFERENCE TO A SPECIFIED REGION WITH ADDITIONAL 
OPTIONAL INFORMATION SUPPLIED BY THE ISSUING TASK. THE SENDER TASK 
MUST ITSELF HAVE THE ACCESS SPECIFIED IN THE REFERENCE. THE REFERENCED 
REGION IS ATTACHED TO THE RECEIVING TASK. 



DPB FORMAT' 



WD. 00 

WD. 01 

WD. 02 - 

WD. 03 

WD. 04 - 



- DIC(69.).0PB SIZE(5.) 
FIRST HALF OF RECEIVER TASK NAME 
SECOND HALF OF RECEIVER TASK NAME 

- OPTIONAL EVENT FLAG TO SET WHEN RECEIVE OCCURS 
ADDRESS OF WINDOW DEFINITION BLOCK 



INPUTS: 



RO'ADDRESS OF THE TCB OF THE RECEIVER TASK 

R1«ADDRESS OF THE TASK STATUS WORD OF THE RECEIVER TASK 

R2=ADPRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3=APDRESS OF THE EFN NUMBER IN THE DPB. 



•••• I 2 **** 



DRMAP MACRO M1108 14-DEC-77 19:58 PAGE 3-7 



DRWP MACRO mi 08 U-DEC-77 19:58 PAGE 3-7 



A30 
A31 
A32 
A33 
A3A 
A35 
A36 
A37 
A38 
439 
AAO 
AA1 
4^2 
AA3 
AAA 
AA5 
AA6 
AA7 
AA8 
AA9 
A50 
A51 
A 52 
A53 
A5A 
A55 
A56 
A57 
AS8 
A59 
A60 
A61 
A62 
A63 
A6A 
A65 
A66 
A67 
A68 
A69 
A70 
A71 
A 72 
A 73 
A7A 
A 75 
A 76 
A 77 
A 78 
A 79 
A80 
A81 



til 

A8A 
A85 
A86 



RA=ADDRESS OF THE HEADER OF THE CURRENT TASK. 
R5=AnORESS OF THE TCB OF THE CURRENT TASK. 

INPUT FIELDS IN THE WINDOW DEFINITION BLOCK ARE: 

W.NRID=ID OF REGION TO BE SENT BY REFERENCE. 
W.NOFF=OFFSET WORD PASSED WITHOUT CHECKING. 
W.NLEN=LENGTH WORD PASSED WITHOUT CHECKING. 
W.NSTS=ALLOWEO ACCESS (DEFAULTS TO ACCESS OF SENDER TASK). 

WS.RED-1 IF READ ACCESS IS TO BE ALLOWED. 

WS.WRT=1 IF WRITE ACCESS IS TO BE ALLOWED. 

WS.EXT=1 IF EXTEND ACCESS IS TO BE ALLOWED. 

WS.DEL^I IF DELETE ACCESS IS TO BE ALLOWED. 
W.NSRT^OPTIONAL ADDRESS OF 8 WORD BUFFER OF ADDITIONAL INFO. 



OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 
DIRECTIVE STATUS OF +1 IS RETURNED. 
C=1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RSV IS RETURNED IF A SEND PACKET 

OR ATTACHMENT DESCRIPTOR COULD NOT BE ALLOCATED. 
DIRECTIVE STATUS OF •D.RS2* IS RETURNED IF AN ATTEMPT IS 

MADE TO SEND TO AN ACP TASK. 
DIRECTIVE STATUS OF •D.RS16' IS RETURNED IF THE DESIRED 

ACCESS TO THE REGION IS DENIED. 
DIRECTIVE STATUS OF 'D.RS86' IS RETURNED IF AN INVALID 

REGION ID WAS SPECIFIED. 
DIRECTIVE STATUS OF •D.RS97' IS RETURNED IF AN INVALID EFN 

NUMBER IS SPECIFIED. 
DIRECTIVE STATUS OF •D.RS98* IS RETURNED 

CHECK OF THE WINDOW DEF BLOCK K 



IF THE ADDRESS 
SEND BUFFER FAILS. 



OUTPUT FIELDS IN THE WINDOW DEFINITION BLOCK ARE: 
NONE. 

THE FORMAT OF THE SEND BY REFERENCE PACKET IS: 
RECEIVE QUEUE THREAD. 
TCB ADDRESS IF EFN SPECIFIED / IF NOT. 
EFN MASK / FIRST WORD OF SENDER TASK NAME. 
EFN ADDRESS / SECOND WORD OF SENDER TASK NAME. 
REGION ID (ATTACHMENT DESCRIPTOR APDRESS). 
OFFSET IN REGION WORD. 
LENGTH OF MAP WORD. 
STATUS WORD. 
08 THRU WD. 017 -- CONTENTS OF SEND BUFFER. 



WD. 


00 


WD. 


01 


WD. 


02 


WD. 


03 


WD. 


OA 


WD. 


05 


WD. 


06 


WD. 


07 



WD. 



.IF DF PIfSRF 



tDRSRF::6IT 



#T3.ACP!T3.NSD.T.ST3(R0) ;SENDS LEGAL TO RECEIVER? 

601 ;IF NE NO 

RO.-(SP) ;SAVf RfCflVtK TASK TCB ADDRESS 

KEFN .-CONVERT EFN NUMBER TO MASK AND ADDRESS 

*f ;IF CS NO EFN WAS SPECIFIED 

R5.-(SP) .-SAVE SENDER TCB ADDRESS 

RO.-(SP) ;SAVE EFN MASK 



#«•• J 2 •*•« 



DRMAP MACRO M1108 U-DEC-77 19:58 PAGE 3-8 



DRIWkP MACRO mi 08 U-DEC-77 19:58 PAGE 3-8 



A87 

A88 

A89 

A90 

491 

A92 

495 

<.9A 

A95 

A% 

A97 

A9B 

A99 

500 

501 

502 

503 

504 

505 

506 

507 

508 

509 

510 

511 

512 

513 

5U 

515 

516 

517 

518 

519 

520 

521 

522 

523 

524 

525 

526 

527 

528 

S?9 

550 

531 

552 

555 

554 

555 

556 

557 

558 

559 

5-0 

541 

542 

545 



MOV 
St: MOV 

MOV 

CALL 

ADD 

CALL 

CMP 



6S: 



lot! 

20t: 
50t: 
40*: 



501: 



MOV 
MOV 
BEQ 
MOV 
DEC 
B6T 
MOV 
MOV 

§1 

■IT 
MQ 

MOV 

MOV 

CALL 

MOV 

BCS 

MOV 

MOV 

TST 

TST 

BEO 

BIC 

MOV 

ADD 



R1,-(SP) ;SAVE EFN ADDRESS 

5$ 

-(SP) .-INDICATE NO EFN SPECIFIED 

T.NAM(R5).-(SP) ;SAVE SENDER TASK NAME 

T.NAM*2(R5).-(SP) ; 

(R3),R3 

#8.»2.R1 

SACHKP 

«W.NRID,R3 

SSRATT 

(R5)*.-(SP) 

(R5)*.-(SP) 

(R3)».-(SP) 

(R5)».-{SP) 

#*C17,(SP) 

6S 



.•PICK UP ADDRESS OF WINDOW DEF BLOCK 

:SET SIZE TO ADDRESS CHECK 

; ADDRESS CHECK AND MAP WINDOW DEF BLOCK 

; POINT TO REGION ID IN BLOCK 

.•SEARCH FOR SPECIFIED ATTACHMENT DESCRIPTOR 

.-BUMP POINTERS FOR REGION ID (W.NRID) 

.-SAVE OFFScT WORD (W.NOFF) 

;SAVE LENGTH WORD (W.NLEN) 

:SAVE STATUS WORD (W.NSTS) 

.•CLEAR ALL BUT ACCESS 

.IF NE ACCESS SPECIFIED 
A.STAT(R5).(SP) .-DEFAULT TO ACCESS OF SENDER TASK 
A.STAT(R5).-(SP) .-PUSH ATTACHMENT DESCRIPTOR ADDRESS 
(SP) ; COMPUTE ACCESS DENIED MASK 

(SP)*.(SP) ;CHEfK SPECIFIED ACCESS AGAINST SENDER TASK 
70S :IF NE ACCESS DENIED 

(R5),R3 .-POINT TO SEND BUFFER 
10S ;IF EQ TKcRE IS NONE 

#8.*2.R1 .-SET SIZE TO ADDRESS CHECK 
SACHKP .•ADDRESS CHECK AND MAP SEND BUFFER 
#8.»2.R5 ;POINT TO END OF SEND BUFFER 
SALPKT ; ALLOCATE A SEND PACKET 
#16.*2,R0 .'POINT PAST END OF SEND Bi REFERENCE DATA 
»8..R1 .SET LOOP COUNT FOR COPY 
RI.R? ;COPY LOOP COUNT 
R3.-(K ;WAS A SEND BL'FFER SPECIFIED? 
30S ;IF EO NO 

-(R3).(R0) ;ELSE COPY NEXT WORD 
R2 .DONE YET? 

20S .-IF GT NO 

(SP).R4 .-PICK [JP STATUS WORD 
'SP)*.-(RO) ; INSERT SAVED WORDS ON STACK 
R1 .DONE YET? 

40S ;IF GT NO 

A.PCB(R5).R2 ;PICK UP PCB ADDRESS FROM ATT DESCRIPTOR 
fPS.C0M.P.STAT(R2) .COMMON PARTITION? 
90S ;IF EO NO. TASK PARTITION :S ILLEGAL 

(R0).R5 .PICK Uf SAVED RECEIVER TASK ADDRESS 
RO,-(SP) ;SAVE ADDRESS OF SEND PACKET 
SCRATT .-ATTACH RECEIVER TASK TO REGION 
(SP)». RO .RETRIEVE ADDRESS OF PACKET 
80S .IF CS ALLOCATION FAIIURE 

RI.IO(RO) ;SET REGION ID IN PACKET 
R0.R1 .COPY POINTER TO PACKET 
<R0)» .POINT TO TCB ADDRESS 
(JO)* ;EFN SPECIFIED? 
50S .IF EO NO 

(RO)*.a(R0)« .CLEAR SPECIFIED EVENT FLAG NOW 
R5,R0 .-POINT TO RECEIVE BY REFERENCE LlSTHfA'j 
#T.RRFl.RO 



•••• K 2 **** 



)RMAP MACRO M1108 14-DEC-77 19:58 PAGE 5-9 



)RHAP MACRO Ml 108 U-DEC-77 19:58 PAGE 3-9 



5AA 
5A5 
546 
5A7 
5A8 
5A9 
550 
551 
552 
553 
55A 
555 
556 
557 
558 
559 
560 
561 
562 
563 
56<i 
565 
566 
567 
568 
569 
570 
571 
572 
573 
57A 
575 
576 
577 
578 
579 
580 
581 
582 
583 
584 
585 
586 
587 
588 
589 
590 
591 
592 
593 
594 
595 
596 
597 
598 

600 



.IF DF ASSTRP 





CALL 
MOV 
CALL 
CALLR 


SQINSF 
#H.RRVA,R4 
SDASTT 
SDRDSE 




.Iff 






CALLR 


SQINSF 




.ENDC 




60S: 
70$: 
SOS: 

90S: 


DRSTS 

DRSTS 

CALL 

DRSTS 

CALL 

DRSTS 


D.RS2 

D.RS16 

SDEPKT 

D.RS1 

SDEPKT 

D.RS86 



INSERT IN RECEIVE QUEUE 
SET OFFSET TO RECEIVE Br REF AST BLOCK 
DECLARE RECEIVE BY REFERENCE AST 
DECLARE A SIGNIFICANT EVENT 



; INSERT IN RECEIVE QUEUE AND EXIT 



ATTEMPT TO SEND TO AN ACP TASK 

PRIVILEGE VIOLATION 

DEALLOCATE SEND PACKET 

ALLOCATION FAILURE 

DEALLOCATE SEND PACKET 

INVALID REGION ID (NOT COMMON BLOCK) 



••-SDRRRF-RECEIVE BY REFERENCE 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO DEQUEUE THE NEXT RECEIVE BY 
REFERENCE PACKET IN THE RECEIVE QUEUE. OPTIONALLY EXITING IF THERE IS 
NOT ONE THERE. 

DP6 FORMAT: 

WD. 00 — DIC(81.).DPB SIZE(2.) 

yO. 01 — ADDRESS OF WINDOW DEFINITION BLOCK 

INPUTS: 

R2sADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3-ADDRESS OF 1HE WINDOW DEFINITION BLOCK. 

R4=ADDRESS OF THE HEADER OF THE CURRENT TASK. 

R5*ADDRESS OF THE TCB OF THE CURRENT TASK. 

INPUT FIELDS IN THE WINDOW DEFINITION BLOCK ARE: 
W.NSTS>CONTROL INFORMATION. 

WS.MAPcl IF RECEIVED REFERENCE IS TO BE MAPPED. 

WS.RCXO IF TASK EXIT DESIRED IF NO PACKET FOUND. 
W.N*iR8>0PTI0NAL ADDRESS OF 10 WORD BUFFER FOR ADDITIONAL INFO. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C«0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 
DIRECTIVE STATUS OF «1 IS RETURNED. 
C"1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RS8' IS RETURNED IF THfRf IS NO 
; RECEIVE BY REFERENCE ENTRY IN THE QUEUE. 

; DIRECTIVE STATUS OF 'D.RS9B' IS RETURNED IF THE ADDRESS 

CHECK OF THE RECEIVE BUFFER FAILS. 

; OUTPUT FIELDS IN THE WINDOW DEFINITION BLOCK ARE: 



•••• L 2 •••• 



DRMAP MACRO M1108 U-DIC-77 19:58 PAGE 5-10 



1 



SDRRRF ; 



DRMAP MACRO Ml 108 U-DEC-77 19:58 PAGE 3-10 



601 

602 

603 

604 

605 

606 

607 

608 

609 

610 

611 

612 

613 

61A 

615 

616 

617 

618 

619 

620 

621 

622 

623 

62A 

625 

626 

627 

628 

629 

630 

631 

632 

633 

634 

635 

636 

637 

638 

639 

640 

641 

642 

643 

644 

645 

646 

647 

648 

649 



20S: 



25S: 
30S: 



40S: 



<0» 



:M0V 
NOV 
MOV 
BEQ 
CLR 
CLR 
TST 
NOV 
BEQ 
NOV 
MOV 
MOV 
CHP 
ADD 
NOV 
NOV 
NOV 
BIS 
NOV 
BEQ 
NOV 
NOV 
CALL 
NOV 
NOV 
NOV 
NOV 
BEQ 
NOV 
NOV 
CMP 
MOV 
MOV 
DEC 
BGT 
NOV 
NOV 
NOV 
NOV 
BEQ 
(Mi 
«•«/ 

C*' , 

' 'IV 



W.NRID=ASSIGNED REGION ID OF 

y.NOFF=OFFSET WORD SPECIFIED 

y.NLEN-LENGTH WORD SPECIFIED 

U.NSTS=STATUS WORD SPECIFIED 

WS.REDsl IF ATTACHED 

WS.WRT^I IF ATTACHED 

WS.EXT=1 IF ATTACHED 

WS.DEL=1 IF ATTACHED 

WS.RRF=1 IF RECEIVE 



THE REFERENCED REGION. 
BY SENDER TASK. 
BV SENDER TASK. 
BY SENDER TASK. 
WITH READ ACCESS. 
WITH WRITE ACCESS. 
WITH EXTEND ACCESS. 
WITH DELETE ACCESS. 
WAS SUCCESSFUL. 



KISAR6.-(SP) 

R3,-(SP) 

T.RRFL(R5).R2 

60S 

-(SP) 

-(SP) 

(R2)t 

(R2)*,R0 

20$ 

(R2).(SP) 

2(R2).2(SP) 

RO,-(SP) 

(R2)*,(R2)» 

«W.NRID.R3 

(R2)*.(R3)* 

(R2)*.(R3)* 

(R2)*,{R3)» 

(R2)»,(R3)* 

(R3).R3 

40$ 

#10.«2.R1 

R2,-(SP) 

$ACHKP 

(SP)*,P2 

-U(R2).(R3)t 

-12(R2).(R3)» 

-16(R2).R0 

25$ 



;SAVE APR6 BIAS 

.'SAVE WINDOW DEFINITION BLOCK POINTER 

.PICK UP FIRST RECEIVE BY REF PACKET 

;IF EQ THERE IS NONE 

;INIT EFN ADDRESS 

' INIT EFN NASK 

•POINT TO RECEIVER TC9 ADDRESS IN PACKET 

;PICK UP TCB ADDRESS 

.IF EQ NONE SPECIFIED 

.SET REAL EFN NASK ;**-2 

.-SET REAL EFN ADDRESS 

.•SAVE TCB ADDRESS ; TM0B6 

;SKIP TO REGION ID ; rM086 

: POINT TO REGION ID WORD IN DEF BLOCK .•**-2 

.STORE REGION ID 

.STORE OFFSET 

; STORE LENGTH 

.•STORE ACCESS 

;PICK UP VIRTUAL ADDR OF EXTENDED INFO BUFFER 

:IF EQ THERE ONE WAS NOT SPECIFIED 

••SET SIZE TO ADDRESS CHECK 

.SAVE R2 

; ADDRESS CHECK THE BUFFER 

.RESTORE R2 

.•STORE THE TASK NAME IN THE BUFFER 



.•PICK UP SENDER TCn ADDRESS 

.IF EQ THERE IS NONE 
T.NAM»2(R0),-(R3) .SET REAL TASK NAME 
T.NAN(R0).-(R3) ; 

(R3)S(R3)* .-POINT PAST TASK NAME 

*8.,R0 ;SET LOOP COUNT FOR REST iJ^ INFO 

(R2)*.(R3)* .MOVE REST OF EXTRA INFo 

RO ;DONE YET? 

30$ ;IF GT NO 

R5,R3 ;SAVE RECEIVER TASK TCB ADDRESS 

(SP)».R5 ;RETR1EVE SENDER TASK TCB ADDRESS 

(SP)».RO ;RETRIEVE EVENT FLAG MASK 

(SP)».R1 .RETRIEVE EVENT FLAG WORD ADDRESS 

50$ .IF EQ NO FLAG TO SET 

tSETN ;SET THE EVENT FLAG 

R3,«5 .RESTORE TCB ADDRESS 

"5, HO .-POINT TO RECtlVfc BY REFERENCE LlSTHEAD 

fT.RRFL.RO 

$ORMVF ; REMOVE PROCESSED PACKET 

R1.W ;COPY POINTER TO PACKET 



TM086 
TM086 
TM066 
TM086 
TM0B6 
TM086 
TM0B6 
TM086 
• *-2 



•••t N 2 **** 



DRMAP MACRO Ml 108 U-DEC-77 19:58 PAGE 5-11 



"1 



DRHAP MACRO Ml 108 U-DEC-77 19:58 PAGE 3-11 



60$: 



70$: 
SOS: 



CALL 

MOV 

MOV 

BIS 

BIT 

BEQ 

CALLR 

BIT 

BEO 

CMP 

JMP 

DRSTS 

RETURN 

.ENDC 



SDEPJCT ; DEALLOCATE PACKET 

(SP)^,R3 .-RESTORE VINDOW DEFINITION POINTER 

(SP)«,KISAR6 :RESTORE KERNAL APR6 BIAS 

«US.RRF,U.NSTS(R3) .-INDICATE SUCCESSFUL RECEIVE BY REFERENCE 

«US.MAP,W.NST3(R3) .-WINDOW NAP DESIRED? 

SOS ;IF EQ NO 

SDRMAP :MAP WINDOW 

«WS.RCX,W.NSTS(R3) .-DOES TASK WISH TO EXIT? 



70S 
{SP)*,(SP)* 
SDREXT 
D.RS8 



IF EQ NO 

CLEAN STACK 

PERFORM TASK EXIT 

NO ''«ERENCES IN QUEUE 



••-SDRGMX-GET MAPPING CONTEXT 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RETURN THE MAPPING CONTEXT OF 
THE TASK. I.E. TO FILL IN UP TO N WINDOW DEFINITION BLOCKS. 
WHERE N IS THE TOTAL NUMBER OF WINDOW BLOCKS IN THE TASK HEADER. 
NO INFORMATION IS RETURNED ON UNUSED WINDOW BLOCKS. 

DPS FORMAT: 

WO. 00 — DlC(1:?.).DPfl SIZE(2.) 

WD. 01 — ADDRESS OF THE N WINDOW DEFINlTivW BLOCKS 

INPUTS: 

RZ^ADDRESS OF THE TASK STATUS WORD OF THE CURRFNT ' \SK. 
(R3) 'ADDRESS OF N WINDOW DEFINI.ION BLOCKS 
RA'ADDRESS OF THE HEADER OF THE CURRENT TASK. 
R5«ADDRESS Cf THE TCB OF THE CURRENT TASK. 

INPUT FIELDS 1^ THE WINDOW DEFINITION BLOCKS ARE: 
NONE. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C"0 IF DIRECTIVE IS SUCCESSFULLY (OMPLtTED. 
DIRECTIVE STATUS OF H IS RETURNED. 
C«1 IF DIRECTIVE IS REJECTED. 

DIRECTWE STATUS OF 'O.RSVS' IS Rfc TURNED IF THE ADDRESS 

CHECK OF THE N WINDOW BLOCKS PLUS TFRMINATOR WORD 
FAILS, 

OUTPUT FIELDS IN EACH WINDOW DEFINE 'ON BLOCK ARE: 

W.NIDiADDRESS i- INOOW ID OF N.XT ESTABLISHED ADDRESS WINDOW. 

W.NAPR:cBASF AP>( OF THE WINDOW. 

W.NBAS»V1RTUA BASE ADDRESS OF THE WINDOW. 

W.NSI/=SIZE Cf THE ADDRESS WINDOW. 

W.Nr>ID=^REGIO'< ID If MAPPED OR UNMODIFIED. 

W.NOff=^OfFSE» 'N REGION If MAPPED OP UNMODIflED. 

W.NLFN'LENGTh Of MAP If "APPED OR LtNMODIflED. 



•••* N 2 **** 



DRHAP MACRO M1108 U-DEC-77 19:58 PAGE 3- 1 2 



725 
726 
727 
728 
720 
750 
731 
732 
733 
734 
735 
736 
737 
738 
739 
740 
741 
742 
743 
744 



.IF DF 


P$$GMX 


SDRGnX::nOV 


H.yND(R4}.R4 


MOV 


(R4)«,R1 


MOV 


RI.-(SP) 


ASL 


R1 


ASL 


R1 


ASL 


R1 


INC 


R1 


ASL 


R1 


nov 


<R3).R3 


CALL 


$ACHKP 


CLR 


-(SP) 


10$: TST 


W.BSIZ(R4) 


BNE 


11$ 


ADD 


«W.BLGH.R4 


BR 


40$ 


11$: NOVB 


(SP).(R3)» 


MOV 


(R4)*,-(SP) 


MOV 


(R4)t,R1 


MOVB 


-1(R«).(R3) 


ASL8 


(R3) 


ROLB 


vR3) 


ROLB 


(R3) 


ROLB 


(R5)< 


MOV 


R1.(R5)* 


MOV 


(R4)«.R2 


MOV 


(R4)».R0 


MOV 


(R4;*.(RS)* 


TSf 


(SP)* 


BEQ 


20$ 


MOV 


R0.(R3)* 


MOV 


T.ATT(R5),-(S 


SUB 


«A.TCBL,(SP) 


CMP 


RO.(SP)» 


BNC 


15i 


CLR 


-2(R3) 


15$: MOV 


(R4)*,(R3)» 


sue 


R1.R2 


ADD 


#1.R2 


ROL 


R2 


ROL 


R2 


ROLB 


R2 


SyAB 


R2 


MOV 


R2.(R3)» 


TST 


(R4)* 


MOV 


(R4)*,(R3) 


BIC 


#*C«,(R5) 


ASR 


(R3) 


BIS 


»WS.MAP,(R5)» 


BR 


W$ 



W.NSTS=NECESSARY BITS TC RESTORE MAPPING OR IF NOT MAPPED. 
WS.MAP=1 IF WINDOW IS MAPPED. 
WS.WRT«1 IF WINDOW IS MAPPED WITH WRITE ACCESS. 



.•POINT TO NUMBER OF WINDOW BLOCKS IN HEADER 

.•PICK UP NUMBER OF WINDOW BLOCKS 

.•SAVE NUMBER OF WINDOW BLOCKS 

; CONVERT TO BYTES TO ADDRESS CHECK 



.■(INCLUDE WORD FOR TERMINATOR) 

•PICK UP VIRTUAL ADDRESS OF WINDOW BLOCKS 

.•ADDRESS CHECK AND MAP TO WINDOW BLOCKS 

.INITIALIZE WINDOW ID COUNTER 

;IS NEXT BLOCK AN ESTABLISHED WINDOW? 

;IF NC YES ; TM076 

.•POINT TO NEXT WINDOW BLOCK ; TM076 

.BRANCH TO DETERMINE IF MORE BLOCKS ; TM076 

.SET WINDOW ID (W.NID) ; TM076 

;SAVE PCB ADDRESS (W.BPCB) ;**-2 

.PICK UP LOW VIRTUAL ADDRESS (W.BLVR) 

.-GET ITS HIGH BYTE (W.BLVR*1)(W.NAPR) 

.SHIFT TO FORM APR NUMBER (W.NAPR) 



.•SET VIRTUAL BASE ADDRESS (W.NBAS) 

;PICK Ur HIGH VIRTUAL ADDRESS (W.BHVR) 

;PICK AT) DESCRIPTOR ADDRESS (W.BATT) 

.•SET WINDOW SIZE (W.BSIZXW.NSIZ) 

.•IS THIS WINDOW MAPPED? 

;IF EQ NO 

;SET REGION ID (W.NRID) 

.PUSH ADDRESS OF FIRST ATTACHMENT DESCRIPTOR 

.POINT TO FIRST WORD 

.•TASK REGION? 

' IF NE NO 

•SET IT TO DEFAULT TO TASK REGION (W.NRID) 

;SET OFFSET (W.BOFF ) (W.NOFF) 

.•CALCULATE LENGTH 

; CONVERT TO S2W BLOCKS 

• 

; 

,SfT THE LENGTH (W.NLCN) 

.ADVANCE TO I AST PDR IMAGE (W.BFPD) 

;PICK UP LAST PDR IMAGE (W.BLPD) (W.NSTS) 

;CLEAR ALL BUT WRITE ACCESS BIT (W.NSTS) 

.SHIFT INTO PLACE (W.NSTS) 

.-INDICATE WINDOW IS MAPPED (W.NSTS) 

I 



•••« 



•••• 



TT 



tMiMAti ijAfpn Miift* ii.hrr.yy iQ-^li Ptr.f X-H 



DRMAP MACRO M1108 U-DEC-77 19:58 PAGE 3-15 



20S: 



BOS: 
AOS: 



7|S 
71 



ADO 
ADD 
CLR 
TST 
INC 
CMP 
BLO 
MOV 
NEG 
TST 
RETURN 

.ENDC 



.ENDC 



«W.NSTS-W.NRID,R3 ;POINT ij NEXT WINDOW ID BLOCK 
HrW.BLGH-W.BOFF.RA .-POINT TO NEXT WINDOW BLOCK 



(R3)t 

(R3)* 

(SP) 

(SP),2(SP) 

10$ 

(SP)*.(R3) 

(R3) 

(SP)* 



TM076 



CLEAR STATUS WORD 

SKIP OVER SEND/RECEIVE BUFFER ADDRESS (W.NSR8) 

BUMP WINDOW ID 

DONE YET? 

IF LO NO 

STORE NUMBER OF HEADER SLOTS AS TERMINATOR 

AND NEGATE 

CLEAN STACK 



000001 



.END 



••** c s **** 



KMiAa MArnn Mima ii..htr.77 lOifi OAfir t>U 



ORMAP MACRO Ml 108 U-OEC-77 19:58 PAGE 3-U 
SYMBOL TABLE 



K$SLDC= 000001 
ICS»TPS= 000074 
MtSCRBr 0001 2A 
R»SF11= 000001 
RSSJPO- 000000 



RSSJP1= 000001 
R»SJS1= 000001 
RSSKIIs 000001 
R$SP11= 000001 
RSSXilr 000001 



CtSORE= OOOAOO 
HtSRTZ^ 000074 
K»CNT= 1775A6 
K»»CSR= 177546 
KS$IEN= 000115 

. ABS. 000000 000 
000000 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 1120 WORDS ( 5 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGt;>; 
ELAPSED TIME: 00:00:19 

CA1,203DRMAP,SYO:C41.303DRMAP/-SP=C1,1]EXEMC/ML.C41,10:RSXMC,[11,10]DRMAP 
G 



RSSIIMr OOOOOO 
RSSIISr OOOOOO 
SSSECC- OOOOOO 
S$$YS2= 001000 
T$$A11= 000001 



T$$C11« 000001 
T«J16= 000001 
T$$KMG--. OOOOOO 
T$$M11s 000001 
VSSCTRs 000400 



••*• D s **** 



N ! i 




**** I 3 **** 



OWKT MACHO Mil Oft U-OfC-77 19:59 PAGE 2 



DRMKT MACRO Ml 108 K-DEC-77 19:59 PAGE 2 



.TITLE DRMKT 
. I DENT /OA/ 



9 
10 
11 
12 
13 
H 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 

27 000000 
28 
29 
30 
31 
32 
33 
3A 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 

2'> 
55 

h 

57 



COPYRIGHT (C) 1974. 1V76 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 04 

D. N. CUTLER 5-SEP-73 

PREVIOUSLY MODIFIED BY: 

T. J. MILLER 

MODIFIED BY: 

MARK TIME AND RUN DIRECTIVES 

MACRO LIBRARY CALLS 



.MCALL 
CLKDFS 



CLKbrS 



.-DEFINE CLOCK QUEUE CONTROL BLOCK OPFSETS 



•*-$DRMKT-MARK TIME 



THIS DIRECTIVE INSTRUCTS THE SYSTEM TO DFCLARE A SIGNIFICANT EVENT AT A 
SPECIFIED INTERVAL FROM INSSUANCE. 



DPB FORMAT: 



WD. 00 -- 

WD. 01 - 

WD. 02 -- 

WD. 03 -- 

WD. 04 - 



DIC(23.),DPB SIZE(5.). 

EVENT FLAG NUMBER OF EVENT FLAG TO BE SET. 

TIME INTERVAL MAGNITUDE. 

TIME INTERVAL UNITS. 

AST ENTRY POINT ADDRESS. 



IF AN EVENT FLAG IS SPECIFIED, THEN IT IS CLEARED AT ISSUANCE AND 
SET AT THE TIME OF THE SIGNIFICANT EVENT. 

IF AN AST ENTRY POINT IS SPECIFIED, THEN AN ASYNCHRONOUS TRAP 
WILL OCCUR AT THE TIME OF THE SIGNIFICANT EVFNT. PS. PC, THE 
DIRECTIVE STATUS WORD, AND THE SPECIFIED EVENT FLAG NUMBER 
ARE PUSHED ONTO THE TASK STACK WHEN THE AST IS EFFECTED. 



INPUTS: 



RO'EVENT FLAG MASK WORD. 

R1-EVENT FLAG MASK ADDRESS. 

R2bADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3«ADDRESS OF THE THIRD WORD IN THE DHB. 

R4sADDRESS OF THE HEADER OF THE CURRENT TASK. 



••*• 



TT 



t*** 



DRMKT MACRO Mil 08 14-DIC-77 19:59 PAGE 2-1 



ORWCT MACRO Ml 108 U-OEC-77 19:59 PAGE 2-1 



58 
59 
60 
61 
62 
63 
(A 
65 
66 
67 
68 
69 

70 000000 

71 OOOOOA 

72 000006 

73 000010 

74 000012 

75 000016 

76 000020 

77 000022 

78 00002A 

79 000026 

80 000030 
81 

82 

83 

84 

85 

86 

87 

88 

89 

90 

91 

92 

93 

94 

95 

96 

77 

98 

99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 

lis 

114 



R5=ADDRESS OF THE TCB OF THE CURRENT TASK. 
OUTPUTS: (DIRECTIVE STATUS AND PS WORD RETURNED TO TASK) 

C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF tl IS RETURNED. 
C«1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RSV IS RETURNED IF INSUFFICIENT 
CORE IS AVAILABLE TO ALLOCATE CLOCK QUEUE ENTRY. 



016346 177776 
040011 
010146 
010004 

010046 
010146 
010446 
005004 
011346 
000422 



SDRMKT: 



.ENABL 


Lsa 


MOV 


-2(R3),-(SP) 


BIC 


RO.(RI) 


MOV 


R1,-(SP) 


MOV 


R0,R4 


CALL 


$CVRTM 


MOV 


RO.-(SP) 




R1,-(SP) 


MBV 


R4,-(SP) 


Cul 


R4 


fWV 


{R3),-(SP) 


Ml 


20S 



;SAVE EVENT FLAG NUMBER 

; CLEAR EVENT FLAG 

;SAVE EVENT FLAG MASK ADDRESS 

;SAVE EVENT FLAG MASK 

.•CONVERT TIME TO CLOCK TICKS 

:SAVE HIGH ORDER PART OF TIME 

.-SAVE LOW ORDER PART OF TIME 

;SAVE EVENT FLAG MASK 

.•SET TYPE OF CLOCK QUEUE ENTRY 

;SAVE AST ENTRY POINT ADDRESS 

; 



**-SDRRUN-RUN TASK 



THIS DIRECTIVE INSTRUCTS THE SYSTEM TO GENERATE A CLOCK QUEUE ENTRY 
TO CAUSE A TASK TO BE REQUESTED AT A SPECIFIED DELTA TIME FROM 
ISSUANCE AND TO OPTIONALLY REPEAT THE REQUEST PERIODICALLY. 



DIC(17.).0Pfl SIZE (11.). 

FIRST HALF OF TASK NAME. 

SECOND HALF OF TASK NAME. 

PARTITION NAME-NOT SUPPORTED BUT MUST BE PRESENT. 

PARTITION NAME-NOT SUPPORTED BUT MUST BE PRESENT. 

REQUEST PRIORITV-NOT SUPPORTED BUT MUST BE PRESENT. 

REQUEST UIC. 

DELTA TIME MAGNITUDE. 

DELTA TIME UNITS. 

RESCHEDULE INTERVAL MAGNITUDE. 

RESCHEDULE INTERVAL UNITS. 



DPB FORMAT: 


WD. 


00 


WD. 


01 


WD. 


02 


WD. 


03 


WD. 


04 


WD. 


05 


WD. 


06 


WD. 


07 


WD. 


10 


WD. 


11 


WD. 


12 



INPUTS: 



RO'ADDRESS OF THE TCB OF THE OF THE TASK TO BE RUN. 

R1 'ADDRESS OF THE TASK STATUS WORD OF THE TASK TO BE RUN. 

R2'ADDRESS OF THE TASK STATUS WORD OF THF CURRENT TASK. 

RS'ADDRESS OF THE PARTITION NAME IN THE DPB. 

R4*ADDRESS OF THE HEADER OF THE CURRENT TASK. 

R5-ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C«0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 



•••• Q 3 **** 



0RMK1 MACRO M1108 U-OEC-77 19:59 PAGE 2-2 



000032 
00003A 
OOOOAO 



010005 

062703 000006 

0050A6 



SDRRUN: 



DRMKT MACRO Ml 108 U-DEC-77 19:59 PAGE 2-2 



115 
116 
117 
118 
119 
120 
121 
122 
123 
12A 
125 
126 
127 
128 
129 
130 
131 
132 
133 
13« 
135 
136 
137 
138 
139 
HO 
HI 
^^,2 
U3 
IM 
U5 
U6 
U7 
U8 
U9 
150 
151 
152 
153 
15A 
155 



0O0OA2 0123«6 



0O0OA4 
000050 
000052 
000054 
000060 
000062 
000064 
000066 
000072 
000074 
000076 
000102 
000106 
000112 

156 0001U 

157 000116 
000122 
000126 



158 
159 
160 
161 
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 



010046 

010146 

012704 000004 

012300 

001403 

024344 

010046 
010146 

012660 000012 

012660 000014 

012602 

012601 

012660 000016 

112660 000003 



IMt 
lOlt 



SMi 



000001 



DIRECTIVE STATUS OF t1 IS RETURNED. 
C=1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RSV IS RETURNED IF INSUFFICIENT 
CORE IS AVAILABLE TO ALLOCATE CLOCK QUEUE ENTRY. 



!MOV 
ADD 
CLR 



MOV 
MOV 
CALL 

m 

MOV 
.IFF 
MOV 
.ENDC 



.IF OF 

DRSTS 

.ENDC 

.DSA8L 
.END 



R0.R5 
ir6,R3 
-(SP) 



.IF DF M$SnUP 



(R3)*,R1 

R3.-(SP) 

SUISET 

(SP)+,R3 

30S 

R1,-(SP) 



(R3)*.-(SP) 



;SAVE TCB ADDRESS OF TASK TO RUN 
; POINT TO REQUEST UK IN DPS 
.-SET DUMMY EFN NUMBER 



.•PICK UP SPECIFIED UK 

.-SAVE R3 

;ESTABLISH DEFAULT AND CURRENT UK'S 

.•RESTORE R3 

;IF CS NONPRV TASK SPECIFIED DIFF UIC 

;SAVE CURRENT UIC 



;SAVE SPECIFIED UK 



SCVRTM 

RO,-(SP) 

RI.-(SP) 

#C.SSHT.R4 

(R3)*,R0 

10S 

-(R3).-{R4) 

SCVRTM 

RO.-(SP) 

RI.-(SP) 

SALCLK 

(SP)*.C.RSI(RO) 

(SP)*,C.RSI*2(R0) 

(SP)*.R2 

(SP)*.R1 

(SP)».C.UK(RO) 

(SP)».C.EFN(RO) 

SCLINS 



CONVERT DELTA TIME TO CLOCK TICKS 
SAVE HIGH ORDER PART OF TIME 
SAVE LOW ORDER PART OF TIME 
ASSUME SINGLE SHOT REQUEST 
ANY RESCHEDULE INTERNAL SPECIFIED? 
IF EQ NO 

ADJUST DPB ADDRESS AND ENTRY TYPE 
CONVERT RESCHEDULE INTERNAL TO CLOCK TICKS 
SAVE HIGH ORDER PART OF TIME 
SAVE LOW ORDER PART OF TIME 
ALLOCATE A CLOCK QUEUE CONTROL BLOCK 
INSERT AST ADDRESS/LOW PART OF RSI 
.■INSERT EFN MASK/HIGH PART OF F 
RETRIEVE DELTA TIME TICKS COUNT 

INSERT EFN MASK ADDRESS/UIC 
INSERT EFN/ZERO BYTE 
INSERT IN CLOCK QUEUE 



RSI 



MtSMUP 
D.RS16 

LSB 



.-PRIVILEGE VIOLATION 



•••• M 



•t«* 



DRMKT MACRO Ml 108 

CVMBTU T&OI t 



U-DEC-77 19:59 PAGE 2-3 



DRMKT MACRO MHOS 
SYMBOL TABLE 



U-DEC-77 19:59 PAGE 2-3 



CttORE= 

C.AR5 

CAST 

C.CSTP= 

C.DST 

C.EFN 

C.LGTH= 

C.LNK 

C.MRKT= 

C.RQT 

. ABS. 



OOOAOO 
OOOOU 
000012 
000012 
000016 
000003 
000020 
000000 
000000 
000002 



C.RSI 

C.SCHO= 

C.SRC 

C.SSHT= 

C.SUB 

C.SYST= 

C.SYTK= 

C.TCB 

C.TIM 

C.UIC 



000012 
000002 
OOOOU 
000004 
000012 
000006 
000010 
000004 
000006 
000016 



HS$RTZ= 
KSSCNT- 
KSSCSR= 
KSSIEN= 
K$SLDC= 
•($STPS= 
M$SCR8= 
RSSF11= 
RSSJP0= 
RStJPIs 



00007A 
177546 
177546 
000115 
000001 
000074 
000124 
000001 
000000 
000001 



R$$JS1= 
R$»K11= 
R$$P11= 
RSSX11= 
RS$11M» 
R$S11S= 
SSSECC: 
S»»YSZ= 
T»$A11= 
T»SC11= 



000001 
000001 
000001 
000001 
000000 
000000 
000000 
001000 
000001 
000001 



T$$J16= 

TSSKMG= 

T$$M11= 

V$$CTR= 

$ALCL((= 

$CLINS= 

$CVRTM= 

$DRMKT 

SDRRUN 



000001 
000000 
000001 
000400 

****** QX, 
****** QX 
****** QX 

OOOOOORG 
000032R6 



000020 000 
000132 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 1522 WORDS ( 6 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:11 
C41,20]DRMKT,SY0:C41.30DDRMKT/-SP=C1.1JEXEMC/ML.C41,103RSXMC,C11.103DRHKT 



•••• I 3 **** 




•••• J 5 **** 



ORWt WACRO«nO« U-0IC-rM9i59 PAGt 2 



ORPUT MACRO M1108 H-OEC-77 19:59 PAGE 2 



L 



1 

2 
3 

A 

5 

6 

7 

8 

9 
10 
11 
12 
15 
U 
15 
16 
17 
IB 
19 
20 
21 
22 
23 
2A 
25 
26 
27 

28 000000 

29 000000 
30 

31 
32 
33 
% 
35 
36 
37 
38 
39 
AO 
41 

ti 

A5 
A6 
A7 
A8 
A9 
50 
51 

n 

5A 
55 

,1 



.TITLE DRPUT 
.IDENT /07/ 



COPYRIGHT (C) 197A, 1976 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 07 

D. N. CUTLER 6-SEPT-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
T. J. MILLER 

MODIFIED BY: 

SPECIFY FLOATING POINT. POWERFAIL, AND RECEIVE AST TRAPS 

MACRO LIBRARY CALLS 



.MCALL HDRDFS.rCBDFS 

HDRDFS 

TCBDFS 



;DEFINE TASK HEADER OFFSETS 
;DEFINE TASK CONTROL BLOCK OFFSETS 



**-IDRFEX-SPECIFY FLOATING POINT EXCEPTION AST 

THIS DIRE^IVE INSTRUCTS THE SYSTEM TO EITHER RECORD THAT FLOATING POINT 
AST'S ARE Dc^lRED OR NOT DEblRED FOP THE ISSUING TASK. 



DPB FORMAT: 



WD. 00 — DIC(111.).DPB SIZE(2.). 

WD. 01 — AST ENTRY POINT ADDRESS OR ZERO. 



INPUTS: 



; R2«ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

t R3<ADDRESS OF THE AST ADDRESS IN THE DPB. 

I RAnADDRESS OF THE HEADER OF THE CURRENT TASK. 

< R5«ADDRESS OF THE TCB OF THE CURRENT TASK. 

I 

; OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

t C«0 If DIRECTIVE SUCCESSFULLY COMPLETED. 

t D.'RECTIVE STATUS OF O IS RETURNED. 

I C'1 IF DIRECTIVE IS REJECTED. 

I DIRECTIVE STATUS OF '0.RS8' IS RETURNED IF AST'S ARE ALREADY 

t NOT DESIRED. 

; DIRECTIVE STATUS Of 'D.RS80' IS RETURNED If DIRECTIVE WAS 

t ISSUED FROM AN AST ROUTINE. 



**** K 5 **•* 



jORI 



0RPU1 MACRO M1108 1A-DtC-77 19:59 PAGE 2-1 



DRPUT MACRO Ml 108 U-DEC-77 19:59 PAGE 2-1 



.ENABL LSe 



.IF OF A$»TRP»F$$LPP 



SDRFEX: 



:ADD 
MOV 
MOV 
MOV 
BR 

.ENDC 



#H.FPVA,R« .-POINT TO FLOATING POINT CONTROL BLOCK ADDRESS 
#2.-(SP) ;SET NUMBER OF AST PARAMETERS 
»9.*2,-(SP) .-SET NUMBER OF BYTES TO ALLOCATE 
#<H.FPVA«256.>.-{SP) ;SET OFFSET TO CONTROL BLOCK ADDRESS 
10S .-FINISH IN COMMON CODE 



•*-$ORPUT-SPECIFY POWER RECOVCRT AST 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO EITHER RECORD THAT POWER RECOVERY 
AST'S ARE DESIRED OR NOT DESIRED FOR THE ISSUING TASK. 



DPB FORMAT: 



WD. 00 - 
WO. 01 - 



DIC(109.).0PB SI2E(2.). 

AST ENTRY POINT ADDRESS OR ZERO. 



INPUTS: 



R2«ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3=:ADDRESS OF THE AST ADDRESS IN THE DPS. 

R4-ADDRESS OF TIE HEADER OF THE CURRENT TASK. 

R5«ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C«0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 
DIRECTIVE STATUS OF t1 IS RETURNED. 
C>1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RSS' IS RETURNED IF AST'S ARE ALREADY 

NOT DESIRED. 
DIRECTIVE STATUS OF 'D.RS80' IS RETURNED IF DIRECTIVE WAS 
ISSUED FROM AN AST ROUTINE. 



.IF DF AttTRPtPSSRFL 



tDRPUT::ADD 
CLR 
MOV 
MOV 
BR 

.ENDC 



#H.PFVA.R4 
-(SP) 

#7.»2.-(SP) 
#<H.PFVA«256.>, 

lot 



POINT TO POWERFAIL CONTROL BLOCK ADDRESS 

SET NUMBER OF AST PARAMETERS 

SET NUMBER OF BYTES TO ALLOCATE 

SP) ;S£T OFFSET TO CONTROL BLOCK ADDRESS 

FINISH IN COMMON CODF 



••«• I 3 •««• 



DRPUT MACRO M1108 U-OtC-77 19:59 PAGE 2-2 



ORPUT MACRO Ml 108 U-DEC-77 19:59 PAGE 2-2 



A 



•♦-IDRRRA-SPECIFV RECEIVE BY REFERENCE AST 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO EITHER RECORD THAT RECEIVE 
BY REFERENCE AST'S ARE DESIRED OR NOT DESIRED FOR THE ISSUING TASK. 

DP6 FORMAT: 

WD. 00 — DIC(21.).DPfl SIZE(2.). 

WD. 01 — AST ENTRY POINT ADDRESS OR ZERO. 

INPUTS: 

R?''ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

; R3=ADDRESS OF THE AST ADDRESS IN THE DPS. 

i R^sADDRESS OF THE HEADER OF THE CURRENT TASK. 

R5=ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (Dir.i'IVE STATUS AND PS RETURNED TO TASK) 



IDRRRA: 



C=> 'F '. DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF ♦! IS RETURNED. 
C«1 IF THE DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RSS* IS RETURNED IF AST'S ARE 

ALREADY NOT DESIRED. 
DIRECTIVE STATUS Of 'D.RS80' IS RETURNED IF DIRECTIVE 
WAS ISSUED FROM AN AST ROUTINE. 



.IF DF AtSTRPtPStLAStPStSRF 



;ADD 
CLR 
MOV 
MOV 
BR 

.ENDC 



#H.RRVA.R« .-POINT TO RECEIVE BY REF CONTROL BLOCK 
-(SP) ;SET NUMBER OF AST PARAMETERS 

#7.«2,-(SP) .-SET NUMBER OF BYTE"? TO *.LLu:ATE 
#<H.RRVA»?56.>.-(SP) ;SET OFFSET TO CrXTROL BLOCK AODR 
10S ; FINISH IN COMMON CO^E 



♦•-IDRRCV-SPECIFY RECEIVE AST 

THIS DIRECTIVE INSTRUCTS THE SYS1EM TO EITHER RECORD THAT RECEIVE 
AST^S ARE DESIRED OR NOT DESIRED FOR THE ISSUING TASK. 

DPS FORMAT: 



WO. 00 -- 0IC(107.).DPB S!ZE(2.). 

WD. 01 -- AST ENTRY POINT ADDRESS OR »R0. 



INPUTS: 



R2«ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 
R3=ADDRESS OF THE AST ADDRESS IN THE DP^. 
R4«ADDRESS OF THE HEADER Of THE CURRENT TASK. 



•••* M 3 •••« 



VmiJ MACRO M1108 U-OtC-77 19:59 PAGE 2-3 



DRPUT MACRO Ml 108 U-DEC-77 19:59 PAGE 2-3 






R5=AD0RESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C=0 IF THE DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF t1 IS RETURNED. 
C=1 IF THE DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RS8' IS RETURNED IF AST'S ARE ALREADY 

NOT DESIRED. 
DIRECTIVE STATUS OF 'D.RS80' IS RETURNED IF DIRECTIVE WAS 
ISSUED FROM AN AST ROUTINE. 



SDRRCV: 



.IF DF ASSTRPtRStSND 



:ADD 
CLR 
MOV 
MOV 

.ENDC 



#H.RCVA,R4 

-(SP) 

(r7.*2.-(SP) 



POINT TO RECEIVE CONTROL BLOCK ADDRESS 
SET NUMBER OF AST PARAMETERS 
SET NUMBER OF BYTES TO ALLOCATE 



#<H.RCVA»256.>,-(SP) .SET OFFSET TO CONTROL BLOCK ADDRESS 



.IF DF FSSLPP!PSSRFL!P$SSRF!RSSSND 



,IF DF ASSTRP 



10$: 


BIT 


#T2.AST!T2.DST 




BNE 


50$ 




MOV 


(R3).R5 




BEQ 


30$ 




MOV 


(R4).R0 




BNE 


20$ 




CALL 


$ALCLK 


20S: 


MOV 


RO.RI 
(R1)* 




TST 




MOV 


(SP)*.(R1)» 




MOV 


(SP)*,(R1)* 
R5,(R1)» 




MOV 




MOV 


(SP)».(ni) 




BR 


m 


30$: 


MOV 


(R4).R0 




BEO 


60$ 




CALL 


$DECLK 




CLR 


RO 


40$: 


MOV 


R0,(R4) 




DRST5 


♦ 1 


50$: 


DRSTS 


D.RS80 


60$: 


DRSTS 


D.RS8 



.(R2) .-ISSUED FROM AST OR AST'S DISABLED? 
IF NE YES 
GET AST ADDRESS 
IF EQ AST'S NOT DESIRED 
GET CURRENT CONTROL BLOCK ADDRESS 
IF NE ALREADY SETUP 
ALLOCATE AST CONTROL BLOCK 
COPY AST CONTROL BLOCK ADDRESS 
POINT TO LENGTH OF CONTROL BLOCK 
SET OFFSET TO CONTROL BLOCK ADDRESS 
SET NUMBER OF BYTES TO ALLOCATE 
SET AST TRAP ADDRESS 
SET NUMBER OF PARAMETERS TO TRANSFER 
TAKE COMMON EXIT 

GET CURRENT CONTROL BLOCK ADDRESS 
IF EO AST'S ALREADY NOT DESIRED 
DEALLOCATE POWERFAIL CONTROL BLOCK 
CLEAR CONTROL BLOCK ADDRESS 
SET ADDRESS OF CONTROL BLOCK 
RETURN DIRECTIVE STATUS OF ♦! 
SET DIRECTIVE STATUS 
SET DIRECTIVE STATUS 



.ENDC 



.INM 



*••• 



ITT 



•••• 



ORPUT MACRO MIIOB 1A-0EC-77 19:59 PAGE 2-A 

IS .DSABL LSB 

IS 000001 .END 



•••<» I 4 •••• 



I ^^>..a MASAA »••*• tA_ik**_«v ta.sa MAmm «— • 



DRPUT MACRO MHOS 
SYMBOL TABLE 



CtSORE": 

HSMTZ": 

H.CSP 

H.CUiC 

H.DSW 

H.DUIC 

H.EFLH 

H.EFSV 

H.FCS 

H.FORT 

H.FPSA 

H.FPVA 

H.GARD 

H.HDLN 

H.IPC 

H.IPS 

H.ISP 

H.LUN 

H.NLUN 

H.NML 

H.QDVA 

H.ODVL 

H.OVLV 

H.PFVA 

H.RCVA 



000400 
00007A 
000000 
000010 
000046 
000012 
000004 
000040 
000050 
000052 
00004? 
000034 
0O0C72 
000002 
000016 
000014 
000020 
000076 
000074 
000061 
000022 
000024 
000054 
000032 
000036 



-Di:C-77 


19:59 PAGE 2-5 












H.RRVA 


000062 


TS.CICP= 


000200 


T.NAM 


000006 


T2.WFR= 000001 


H.SPRI 


000060 


TS.CKRs 


000100 


T.OFF 


000060 


T3.ACP= 100000 


H.TKVA 


000026 


TS.EXE= 


100000 


T.PCB 


000046 


T3.CAL= 000100 


H.TKVL 


000030 


TS.MS6= 


020000 


T.PRI 


000002 


T3.CLI= 001000 
T3.nCR< 004000 


H.VEXT 


000056 


TS.NRP= 


010000 


T.RCVL 


000012 


H.UND 


000044 


TS.OUT* 


000400 


T.RRFL 


000064 


T3.NET* 000020 


KtSCNT:: 


177546 


TS.RON» 


040000 


T.SRCT 


000v63 


T3.NSDS 000200 


K»SCSR» 


177546 


TS.RUN= 


004000 


T.STAT 


000032 


T3.PM0S 040000 


KtSIENr 


000115 


TSSA1U 


000001 


T.ST2 


000034 


T3.PRV» 010000 


KtSLDC> 


0000C1 


T»C11 = 


000001 


T.ST3 


000036 


T3.RE»*» 020000 


KtSTPSs 


000074 


TI$J16« 


000001 


T.TCBL 


000030 


T3.R0V= 000040 


mSCRB» 


000124 


TSSKMGs 


000000 


T.UCB 


000026 


T3.RSTS 000400 


RttFlls 


000001 


TIWIIs 


000001 


T2.AB0' 


000100 


T3.SLV« 002000 


RttJPO' 


000000 


T.ACTL 


000052 


T2.AST« 


100000 


VStCTRs 000400 


R»$JP1« 


000001 


T.ASTL 


000016 


T2.BFX« 


004000 


W.BATT 000006 


R>tJS1« 


000001 


T.ATT 


000054 


T2.CAF= 


000400 


W.BFPD 000014 


Rt$iCl1> 


000001 


T.CPCB 


000004 


T2.CHK= 


020000 


W.BHVR 000004 


RttPII- 


000001 


T.DPRl 


000040 


T2.CK0= 


010000 


W.BLGH 000020 


RS$Xl1s 


000001 


T.EFL6 


000022 


T2.DST= 


040000 


W.BLPD 000016 


RSS11M> 


000000 


T.IOC 


000003 


T2.FX0S 


002000 


W.BLVR 000002 


R»S11Sx 


000000 


T.LBN 


000041 


T2.HLT» 


000200 


W.BNPD 000015 


S»$ECC= 


000000 


T.LDV 


000044 


T2.SPN« 


000004 


W.BOFF 000012 


5$»ysz= 


001000 


T.LNK 


000000 


T2.STP= 


000020 


W.BPCB 000000 


TS.BLK: 


170700 


T.nxsz 


000050 


T2.TI0= 


001000 


W.BSIZ 000010 



. AGS. 000102 000 
000000 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 2685 WORDS ( 11 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:13 
C41.203DRPUT.SY0:C41,30]DRPUT/-SP»C1,1]EXEMC/ML,C41,10]RSXMC.C11.10]DRPUT 



•••• c 4 **** 



rr 




•••• 4 *••• 



hfeam lurBn Mlirui U.h*r.77 IQt^O PACT 9 



DRQIO MACRO Ml 108 U-DEC-77 19:59 PAGE 2 



.TITLE DRQIO 
.IDENT /10/ 



H 

11 

1! 



21 



24 
25 

26 
V 



41 

45 

48 000000 

49 000000 

000000 

1 000000 
- 000000 



COPYRIGHT (C) 1974, 1978 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 10 

D. N. CUTLER 8-OCT-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLE 
C. A. D'ELI 
T. J. MILLEh 

MODIFIED BY: 

T. J. MILLER 8-MAR-77 

TM075 — ADDITION OF BLOCK LOCKING SUPPORT FOR SHARED 
FILES. 

T. J. MILLER 27-APR-77 

TM080 — CORRECT ERROR IN CONDITIONALIZATION. 

T. J. MILLER 26-JUL-77 

TM097 — DISALLOW CONTROL FUNCTIONS FROM NONPRIVILEGED 
TASKS TO MOUNTED MAGTAPES. 

TM098 — DO NOT CHECK DIAGNOSTIC SUBFUNCTION BIT ON 
DEVICES NOT SUPPORTING USER MODE DIAGNOSTICS. 

T. J. MILLER 12-SEP-77 

TM102 — ALLOW MULTIPLE I/O'S FOR CHECKPOINTABLE TASKS. 

MACRO LIBRARY CALLS 



.MCALL 
FllDFl 
HWDDFt 
PKTDFI 
TCBOFI 
PCBDFI 



FIIDFI.HWDDFI, PKTDFI. TCBDFI.PCBDFt 

.-DEFINE FILtS-11 CONTROL BLOCK OFFSETS 
;DEF1NE HARDWARE REGISTERS 
; DEFINE I/O PACKET OFFSETS 
.-DEFINE TASK CONTROL BLOCK OFFSETS 
.-DEFINE PARTITION CONTROL BLOCK OFFSETS 



LOCAl DATA 

TEMPORARY LOCATION TO MARK STACK ADDRESS 



••*• I 4 ••«• 



DRQIO MACRO M1108 U-DEC-77 19:S9 PAGE 2-1 



DRQIO MACRO MIIOB U-OEC-77 19:59 PAGE 2-1 



58 

59 

60 000000 

61 

62 

63 

6<i 

65 

66 

67 

68 

69 

70 

71 

72 

73 

7A 

75 

76 

77 

78 

79 

80 

81 

82 

83 

84 

85 

86 

87 

88 

89 

90 

91 

92 

93 

9^ 

95 

96 

97 

98 

99 
100 
101 
102 
103 
10<i 
105 
106 
107 
108 
109 
110 
111 

lis 

1U 



; 

nSTK: .BLKU 1 ; 

POLISH INTERPRETER DATA BASE 

FUNCTION CODE DISPATCH VECTOR 



.If DF 


ASSCPS 


FCDSP: .WORD 


FCIFC 


.WORD 


FCPKT 


.IF DF 


RSSLKL 


.WORD 


UNLCK 


.IFF 




.WORD 


FCIFC 


.ENDC 




.WORD 


FCPKT 


.WORD 


FCPKT 


.WORD 


FCACC 


.WORD 


FCACC 


.WORD 


FCACC 


.WORD 


FCDAC 


.WORD 


FCRVB 


.WORD 


FCWVB 


.WORD 


FCPtCT 


.WORD 


FCCRE 


.WORD 


FCPKT 


.WORD 


FCPKT 


.WORD 


FCPKT 


.WORD 


FCPKT 


.WORD 


FCWVB 


.WORD 


FCRVB 


.wa'»D 


FCCON 


.WORD 


FCDIS 


.WORD 


FCNCT 


.WORD 


FCIFC 


.WORD 


FCIFC 


.IF NDF 


NSSNET 


FCION: 




FCDIS! 




FCNCT.' 





;10-ILLEGAL FUNCTION 

;11-FIN0 FILE NAME IN DIRECTORY 



;12-UNL0CK BLOCK 



;12-1LLEGAL FUNCTION 



13-REMOVE FILE NAME FROM DIRECTIRY 

U-ENTER FILE NAME IN DIRECTORY 

15-ACCESS FILE FOR READ 

16-ACCESS FILE FOR READ AND WRITE 

17-ACCESS FILE FOR READ. WRITE. AND EXTEND 

20-DEACCESS FILE 

21-READ VIRTUAL BLOCK 

22-WRlTE VIRTUAL BLOCK 

23-EXTEND FILE 

2*-CREATE FILE 

25-MARK FILE FOR DELETE 

26-READ FILE ATTRIBUTES 

Z7-WR1TE FILE ATTRIBUTES 

30-USER MAGTAPE CONTROL L FUNCTION 

31 -TRANSMIT PROCESS MESSAGE 

32-RECEIVE PROCESS MESSAGE 

33-CONNECT TO PROCESS 

U-DISCONNECT FROM PROCESS 

35-NETWORK CONTROL FUNCTION 

36-lLLEGAL FUNCTION 

57-IlLEGAL FUNCTION 



;REF LABEL IF NO NETWORK SUPPORT 
;REF LABEL IF NO NETWORK SUPPORT 
;REF LABEL IF NO NETWORK SUPPORT 



TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 

TM075 
TM075 
TM075 
1M075 



.IFTF 



•#•• f 4 •••* 



DRQIO MACRO MIIOB ;«-DEC-77 19:59 PAGF ?-2 



OfWJlO MACRO mi08 ;A-DEC-77 19:59 PAGE 2-2 



115 
116 
117 
118 
119 
120 
121 
122 
123 
12* 
125 
126 
127 
128 
129 
130 
131 
132 
133 
13A 
135 
136 
137 
138 
139 
UO 
HI 
\'i2 
U3 
U4 
U5 
U6 
H7 
U8 
UO 
150 
151 
152 
153 
15A 
155 
156 
157 
158 
159 
160 
161 
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 



ILLEGAL FUNCTION 



FCIFC: 



.WORD lEIFC 



:SET ILLEGAL FUNCTION STATUS 



ACCESS FILE FOR READ, READ/WRITE, OR READ/WRITE/EXTEND 



FCACC; .WORD CKDMO 

FCCAW: .WORD CKALN 

.WORD BDPKT 

.WORD CKRLK 



DEACCESS FILE 



FCDAC: 



.WORD CKNLN 
.WORD BDPKT 
.WORD CKRLK 



READ VIRTUAL BLOCK 



FCRVB: .WORD CKNLN 
.WORD CKRAC 



WRITE VIRTUAL BLOCK 



FCWVB: 



; 



.WORD CKNLN 
.WORD CKWAC 



; CREATE FILE 



FCCRE: .WORD CKDMO 
.WORD CKACC 



.•CHECK IF VOLUME NARKED FOR DISMOUNT 
.•CHECK IF FILE ALREADY ACCESSED ON LUN 
:BUILD AN I/O PACKET 
.•SYNCHRONIZE ACCESS AND EXIT 



CHECK IF FILE ACCESSED ON LUN 

B'lILO AN I/O PACKET 

EXIT 



.•CHECK IF FILE ACCESSED ON LUN 
.•CHECK i^EAD ACCESS AND EXIT 



;CHECK IF FILE ACCESSED ON LUN 
;CHECK WRITE ACCESS^AND EXIT 



.■CHECK IF VOLUME MARKED FOR DISMOUNT 
.-CHECK IF ACCESS ALSO REQUESTED 



BUILD AN I/O PACKET FOR FIND. ENTER. REMOVE, EXTEND. DELETE. READ 
ATTRIBUTES. AND WRITE ATTRIBUTES 



FCPKT: .WORD BDPKT 
.WORD CKXIT 



.'BUILD AN I/O PACKET 
;EXIT 



; EXPLICIT UNLOCK BLOCK FUNCTION 
I 



TM075 
TM075 
TMQ75 
TM075 



*••• 6 4 •••• 



ORQIO MACRO M1108 U-OEC-77 19:59 PAGF 2-3 



DRQIO MACRO Ml 108 U-OEC-77 19:59 PAGE 2-3 



172 
173 
17A 
175 
176 
177 
178 
179 
180 
181 
182 
183 
18A 
1«'5 
186 
187 
188 
189 
190 
191 
192 
193 
194. 
195 
196 
197 

r? 

199 
200 
201 
202 
203 
204 
205 
206 
207 
208 
209 
210 
211 
212 
213 

215 
216 
217 
218 
219 
220 



.IF DF RSSLKL 

UNLCK: .WORD CKNLN 

.WORD UNLXT 

.ENDC 



.IFF 



CONNECT TO PROCESS 



FCCON: .WORD CKDMO 

.WORD CKALN 

.WORD CKCON 

.WORD CKRLK 



DISCONNECT FROM PROCESS 



FCDIS: .WORD CKNLN 
.WORD CKDIS 
.WORD CKRLK 



NETWORK CONTROL FUNCTION 



FCNCT: .WORD CKDMO 
.WORD CKCON 
.WORD CKXIT 



.•CHECK IF FILE ACCESSED ON LUN 
.-SET REGISTERS AND EXIT 



TM075 
TM075 
TM075 
TM075 
TH075 
TM075 
TM075 
TM075 
TM075 



CHECK IF VOLUME MARKED FOR DISMOUNT 
CHECK IF PROCESS ALREADY CONNECTED ON LUN 
ADDRESS CHECK CONTJECT BUFFER AND EXIT 
INTERLOCK LUN USAGE AND EXIT 



CHECK IF PROCESS CONNECTED ON LUN 
CHECK BUFFER AND COPY PARAMETERS 
INTERLOCK LUN USAGE AND EXIT 



;CHECK IF VOLUME MARKED FOR DISMOUNT 

; ADDRESS CHECK BUFFER 

;EXIT 



.ENDC 



.ENDC 



**-SDRQIO-QUEUE I/O REQUEST 
•*-SDRQIW-QUEUE I/O REQUEST AND WAIT. 

THESE DIRECTIVES INSTRUCT THE SYSTEM TO PLACE AN I/O REQUEST IN A 
QUEUE OF PRIORITY ORDERED REQUESTS FOR A DEVICE-UNIT SPECIFIED BY 
A LOGICAL UNIT NUMBER. IN ADDITION. IF THE DIRECTIVE IS QIC AND 
WAIT AND AN EVENT FLAG IS SPECIFIED. THE TASK IS PUT INTO A WAIT STATE 
FOR THE SPECIFIED EVENT FLAG. 



DPB FORMAT: 

ffiJ? 



- DIC(1./!.)-DPB SI?E(12.). 

- I/O FUNCTICN CODE. 



*#•• H 4 •••• 



OROIO MACRO M1108 U-OIC-77 19:59 PA6F 2-* 



ORQIO MACRO MIIOB U-OEC-77 19:59 PAGE 2-4 



229 
230 
231 
232 
233 
23A 
235 
236 
237 
238 
239 
2A0 
2A1 
242 
243 
244 
245 
246 
247 
248 
249 
250 
251 
252 
253 
254 
255 
256 
257 
258 
259 
260 
261 
262 
263 
264 
265 
266 
267 
268 
269 
270 
271 



W. 02 -- 

WO. 03 - 

WO. 04 - 

WO. 05 — ADDRESS OF AST SERVICE ROUTINE. 

WO. 06 

WO. 07 

WD. 10 

WO. 11 

WO. 12 

WD. 13 



LUN AND UNUSED BYTE. 

EVENT FLAG NUMBER AND PRIORITY 

ADDRESS OF I/O STATUS BLOCK. 



1. 



(PRIORITY IS IGNORED), 



PARAMETER 
PARAMETER 2. 
PARAMETER 3. 
PARAMETER 4. 
PARAMETER 5. 
PARAMETER 6. 



INPUTS: 



R2-ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 
R3-ADDRESS OF THE I/O FUNCTION CODE IN THE DPB. 
R4«ADDRESS OF THE HEADER OF THE CURRENT TASK. 
RS'ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF tl IS RETURNED. 
C') IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RS5' IS RETURNED IF SPECIFIED 
LUN IS NOT ASSIGNED. 



000002 012346 

000004 

000010 103001 

000012 

000014 032711 000001 

000020 001410 

000022 062706 000006 

000026 011400 

000030 162760 000002 000004 

000036 

000042 



.ENABL 
tDRQI0::M0V 
CALL 
BCC 
DRSTS 
IMt UT 



1SS: 



CALLR 



LS8 

(R3)»,-(SP) 

SMPLUN 

10$ 

D.RSS 

#1,(R1) 

15i 

#6.SP 

(R4).R0 

«2.4(R0) 

STKWSE 



.IF DF LStDRV 



274 
275 
276 
277 
278 
279 

t? 

282 
285 
284 
285 



IMi 



BNE 
DRSTS 

.ENDC 



000042 010046 

000044 010146 

000046 111346 
000050 

000054 040011 



)V 
MOVB 

Hi'- 



(R0),R2 
D.DSP(R2) 
16$ 
D.RS6 



RO,-(SP) 

RI.-(SP) 

(R3),-(SP) 

$CEFN 

R0,(R1) 



SAVE I/O FUNCTION CODE 

MAP LUN TO UCB ADDRESS ; TM102 

IF CC LUN ASSIGNED :••-? 

SET DIRECTIVE STATUS 

OPERATION PENDING? 

IF EQ NO 

REMOV FUNC, RETURN AND ♦I FROM STACK ; TM102 

GET SAVED TASK STACK POINTER ,♦•-1 

BACKUP TASK PC SO EMT WILL BE RE-EXECUTED 

WAITFOR SIGNIFICANT EVENT 



GET DCB ADDRESS 

IS THE DRIVER RESIDENT? 

IF NE YES 

SET DIRECTIVE STATUS 



; 



SAVE POINTER TO UCB 
SAVE POINTER TO SECOND LUN WORD 
SAVE EVENT FLAG NUMBER 
CONVERT EVENr FLAG NUMBFR 
CLEAR SPECIFIED EVENT FLAG 



•••• I 4 #••* 



DR(J10 MACRO M1108 14-DEC-77 19:59 PAGE 2-5 



DRQIO MACRO Ml 108 U-DEC-77 19:59 PAGE 2-5 



286 000056 

287 000060 

288 000062 
289 

290 
291 
292 
293 
29A 
295 
296 
297 
298 
299 
300 
301 
302 
303 
304 
305 
306 
307 
308 
309 

310 00006A 

311 000066 
312 

313 

3U 

315 

316 000070 

317 

318 

319 

320 

321 

322 

323 

52A 

325 

326 000074 

327 000100 

328 000102 

329 000110 
350 000112 

331 0001U 

332 000120 

333 000122 

334 000126 

335 000132 
356 000154 
" 000136 

000140 

00Q144 

146 




010346 
011300 
001402 



005020 
005010 



105265 
01260^ 
126527 
001011 
010046 
116600 
001404 



012600 
010004 
005724 
116524 

01( 




MOV 
NOV 
BEQ 



SDQLM1 ; 



SDQLM2: 



20$: 



000003 

177770 000003 



000002 



?4I: 
?5S: 



000002 



:CLR 
MTPI 
CLR 
MTPI 



,lff 



.ENDC 

CALL 

.IF OF 
CLR 

.ENDC 



INCB 

MOV 

CMPS 

BNE 

MOV 

MOVB 

BEQ 

CALL 

CALL 

MOV 

MOV 

TST 

MOVB 

MOVB 

MOV 

MOV 

MOV 



R3,-(SP) 

(R5),R0 

20$ 



.IF DF M$$MGE 



-(SP) 
(RO)* 
-(SP) 
(RO) 



.IF DF A$$CHK 



MOV 
CALL 


#4.R1 
$ACHKW 


.ENOC 




^ 


(RO)* 
(RO) 



$ALPKT 

Rt$LKL 
I.PRM*16(R0) 



.-SAVE ADDRESS OF I/O STATUS BLOCK ADDRESS 
;6ET ADDRESS OF I/O STATUS BLOCK ADDRESS 
;IF FQ NO I/O STATUS BLOCK SPECIFIED 



.-ZERO I/O STATUS BLOCK 

; 



REF LABEL 



INITIALLY CLEAR LOCK ENTRY POINTER 



T.I0C(R5) 

(SP)»,R5 

-10(R5),#5 

25$ 

RO.-(SP) 

?($P).RO 

24$ 

$CEF1 

$DRWFS 

(SP)*,RO 

R0,R4 

(R4)* 

T.PRI(R5),(R4)» 

(SP)%(R4)» 

R5.(R4)* 

(Sn»,(R4)» 

(SP)*,R5 



.-SET LENGTH OF I/O STAFUS BLOCK 
.•ADDRESS CHECK I/O STATUS BLOCK 



: CLEAR I/O STATUS BLOCK 



; ALLOCATE AN I/O PACKET 

TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 

INCREMENT I/O REQUEST COUNT 

RETRIEVE ADDRESS OF I/O STATUS BLOCK ADDRESS 

IS FUNCTION QIO AND WAIT? 

IF NE NO 

SAVE PACKET ADDRESS 

PICK UP EVENT FLAG NUMBER 

IF EQ NONE SPECIFIED 

CONVERT FLAG TO MASK AND ADDRESS 

PUT TASK IN WAIT STATE 

RFSTORE PACKET ADDRESS 

COPY PACKET ADDRESS 

POINT TO SECOND MORD IN PACKET 

PRIORITY IS THAT OF ISSUING TASK 

INSERT EVENT FLAG NUMBER 

INSERT TCB ADDRESS 

INSERT POINTER TO SECOND LUN WOMD 

RETRIEVE UCB ADDRESS 



*•*• J 4 •••• 



DR(JIO MACRO M1108 14-0IC-77 19:59 PAGE 2-6 



DRQIO MACRO Ml 108 U-DEC-77 19:59 PAGE 2-6 



3A3 000154 

344 000156 

345 000160 

346 000162 

347 000164 

348 000170 

349 000172 

350 000174 

351 000176 

352 000200 

353 000204 

354 000206 

355 000210 

356 000212 

357 000214 

358 000216 

359 000220 

360 000222 
361 

362 
363 
364 
365 
366 
367 
368 
369 
370 
371 
372 
373 
374 
375 
376 
377 
378 
379 

380 000224 

381 000230 

382 000232 

383 000234 

384 000240 

385 000244 

386 000246 

387 000252 
»8 000256 

389 000260 

390 000264 

391 000266 

392 000270 

393 000276 

394 000300 

395 000302 
596 0OG3O4 
397 000306 



i8 



010524 

012614 

010046 

005046 

010667 177610 

012446 

005002 

012300 

001402 

010024 
010124 
010224 
012324 
011602 
105002 
000302 
001454 



30S: 



}$%: 



020227 
101056 
011501 
062701 
020227 
101404 
062701 
162702 
006302 
016202 
030221 
0QU37 
132765 
001036 

'M\ 

030221 
001024 



000057 



OOOOOOC 
000017 

000010 
000020 

300000G 



40S: 



OOOOOOC OOOOOOC 



MOV 

BEQ 

BITS 

BNE 

MOV 

CMP 

BEO 

BIT 

BNE 

JMP 



.ENDC 



CMP 

BHl 

MOV 

ADD 

CMP 

BIOS 

ADD 

SUB 

ASL 

MOV 

BIT 

BEQ 

BITB 

BNE 

BIT 

BNE 

BIT 

BNE 



R5,(R4)t 

(SP)*,(R4) 

RO,-(SP) 

-(SP) 

SP.MSTK 

(R4)»,-(SP) 

R2 

(R3)t.R0 

30S 

SRELOC 

R0.(R4)« 

R1,(R4)* 

R2,(R4)* 

(RS)»,(R4)» 

(SP).R2 

R2 

R2 

fCKIL 



INSERT UCB ADDRESS 

INSERT I/O FUNCTION CODE 

SAVE ADDRESS OF I/O PACKET 

CLEAR ADDRESS OF SECONDARY CONTROL BLOCK 

MARK STACK ADDRESS 

SAVE I/O FUNCTION CODE 

ASSUME NO I/O STATUS BLOCK SPECIFIED 

GET ADDRESS OF I/O STATUS BLOCK 

IF EQ NONE SPECIFIED 

RELOCATE I/O STATUS BLOCK ADDRESS 

INSERT VIRTUAL ADDRESS OF I/O STATUS BLOCK 

INSERT RELOCATION BIAS 

INSERT DISPLACEMENT ADDRESS 

INSERT AST SERVICE ROUTINE ADDRESS 

RETRIEVE 1/0 FUNCTION CODE 

CLEAR MODIFIER FLAGS 

S«AP FUNCTION CODE INTO RIGHT BYTE 

IF EQ KILL I/O FUNCTION 



.IF DF MSSMUP 



U.0yN(R5),R0 ;IS THE DEVICE OWNED? 
35S :IF EQ NO 

*yS.PUB.U.ST2(R5) .PUBLIC ACCESS ALLOWED? 
35$ ;IF NE YES 

»TKTCB,R1 .-POINT TO CURRENT TASK'S TCB 
T.UCB(R1).R0 ;DEVIC£ OWNED Br CURRENT TASK? 
35$ ;IF EQ rES 

• T3.PRV.T.ST3(R1) .'CURRENT TASK PRIVILEGED? 
35$ ;If NE YES 

lEPRI .-ELSE PRIVILEGE VIOLATION 

;ACCESS ALLOWED 



R2.«31. ;FUNCTION CODE IN RANGE? 

lEIFC ;IF HI NO 

(R5).R1 .GET ADDRESS OF DEVICE DCS 

fD.MSK.R1 ;ASSUME FUNCTION CODE IN 0-15. RANGE 

R2.#15. ,0-15. FUNCTION CODE? 

40$ .IF LOS YES 

» 0.R1 .POINT TO SECOND MASK SET 

t16..R2 ;REOUC£ FUNCTION CODE 

R2 .CONVERT TO WORD INDEX 

$fTMSK(R2),R2 .-GET FUNCTION MASK WORD 

R?.(R1)» .-IS THIS A LEGAL FUNCTION? 

lEIFC :IF EQ NO 

/»US.OFL.U.ST2(R5) .-DEVICE OFFLINE? 

lEOFL .IF NE YES 

R2.(R1)* ;IS THIS A CONTROL FUNCTION? 

^Cni ;IF NE YES 

R2.(R1)» .-IS FUNCTION NOP'ED? 

issue ;|F NE YES 



•••t K 4 •••• 



DRQIO MACRO M1108 U-DEC-77 19:59 PAGE 2-7 



DRQIO MACRO mi08 U-DEC-77 19:59 PAGE 2-7 



as 

45C 

«51 000310 030211 

«52 00031? 00U11 

4S9 



.IF DF ASSCPS 

TST U.CWKRS) 

BPL SOS 

BITB «US.nNT!US.FOR 

BNE 60S 

BIT R2,(R1) 

BEQ 70S 

MOVB 1(SP).R2 

SIS «10.R2 

BLT SOS 

ASL R2 

m\l R5.-(SP) 

MOV R5.R0 

MOV I.LN2-l.PRM(R<i 

MOV RI.-(SP) 

MOV FC0SP(R2).R5 

JMP a(r,3;t 



:M0UNTA6LE DEVICE? 
'IF PL NO 
,U'.STS(R5) .-DEVICE MOUNTED AND HOI FOREIGN? 
;IF NE NO 
;ACP FUNCTION? 
:IF EQ NO 

.'RETRIEVE I/O FUNCTION CODE 
; NORMALIZE OR POLISH DISPATCH 
;IF LT TABLt INCONSISTANCY 
; CONVERT TO WORD INDEX 
.'SAVE UCB ADDRESS FOR POLISH ROUTINES 

).R1 ;SAVE ADDRESS OF SECOND LUN WORD 
.'FOR POLISH ROUTINES 
.'GET ADDRESS OF POLISH VECTOR 
.'EXECUTE POLISH ROUTINE 



DEVICE TABLE MASK WORD INCONSISTANCY 



50S: CRASH 



DEVICE NOT MOUNTED OR MOUNTED AS FOREIGN 



60S: BIT R2.(R1) 
BNE 75S 

BR FCTRN 



ACP FUNCTION? 
IF NE YES 



DEVICE MOUNTED AND NOT FOREIGN BUT NOT ACP FUNCTION 



70S: 



75S: 



CMP 
BEQ 
MOV 
BIT 
BNE 
JMP 

.ENDC 



#IO.LOV.(SP) ;LOA0 OVERLAY FUNCTION? 

FCTRN ;IF EQ YES 

STKTCB.RO .GET ADDRESS OF TCB OF CURRENT TASK 

#T3.PRV,T.ST3(»0> .TASK PRIVILEGED? 

FCTRN ;IF NE YES 

lEPRI .PRIVILEGE VIOLATION 



DEVICE IS NOT MOUNTABLE 



80S: 



BIT 
BEQ 



R2,(R1) 
FCTRN 



;ACP FUNCTION? 
;ir EQ NO 



FUNCTION IS A FILE STRUC1URI FUNCHON FOR A NONflLE SIRUCIURFD DEVICE. BY DEF- 
INITION THIS MUST BE A READ OR WRITE VlRUTAL SINCF ALL QTHfR FUNCTIONS WOULD 



••*• I 4 •••• 



ORQIO MACRO M11 08 U-MC-77 19:59 PACE ?-8 



DRQIO MACRO NHOS U-OEC-77 19:59 PAGE 2-8 

; HAVE BEEN EITHER ILLEGAL OR NOP'EO. MAP FUNCTION TO IT LOGICAL COUNTERPART. 



ts 



A59 
A60 0003U 
A61 000322 
462 000326 
A63 000330 
464 



46< 

470 000336 



490 000340 
491 



501 

502 000544 

503 000346 

504 000350 

505 000352 



111 000354 



012764 
022716 
001403 
012764 



OOOOOOG 177766 
OOOOOOG 

0000006 177766 



012300 



MOV #10.RLB.I.FCN-I.PRM(R4) .-ASSUME FUNCTION IS READ VIRTUAL 

CMP «I0.RVB.(SP) .-READ VIRTUAL FUNCTION? 

BEQ FCTRN ;IF EQ YES 

MOV «I0.WLBJ.FCN-I.PRM(R4) ;SET FUNCTION TO WRITE LOGICAL BLOCK 

.DSABL LSB 

FUNCTION IS A TRANSFER FUNCTION-ADDRESS CHECK AND MAP TRANSFER 

FCTRN: MOV (R3)t.R0 ;GET ADDRESS OF USER BUFFER 



10$: 



.IF DF ASSCHKiMSSMGE 

MOVB U.CTL(R5),R1 

BPL 10S 

BIT IV1,R0 

BNE 30$ 

BIC ♦•C<UC.LGH>,R1 

BIT R1,(R3) 

BNE 30$ 

MOV (R3),R1 

BEQ lESPC 

CALL $ACHKB 

BCS lESPC 

.ENDC 



CALL $RELOC 



GET CONTROL BVTE 

IF PL BYTE ALIGNMENT ALLOWED 

IS BUFFER BYTE ALIGNED? 

IF NE Y^S-ALIGNMENT ERROR 

CLEAR ALL BUT LENGTH MODULO BITS 

DOES LENGTH HAVE CORRECT MODULUS? 

IF NE NO-ALIGNMENT ERROR 

GET LENGTH OF BUFFER IN BYTES 

IF EO ILLEGAL BUFFER 

ADDRESS CHECK BUFFER 

IF CS ADDRESS CHECK ERROR 



.-RELOCATE USER BUFFER ADDRESS 



; TM097 

;*-1 

; TM097 
.-•*-1 



010124 
010224 
000415 
0004^3 





.If OF 


M$$MGE 






TST 
BEQ 

CALL 


(SP) 
20$ 

$MPPHy 


.-VIRTUAL I/O FUNCTION? 

;IF EQ YES 

;MAP TO 18 BIT PHYSICAL ADDRESS 




.ENDC 






20$: 
30$: 


MOV 
MOV 
BR 
BR 


R1,(R4)» 
R2,(R4)t 
FCXFR 
lEBYT 


.-INSERT RELOCATION BIAS 

; INSERT DlSPLACEMtNT ADDRESS 

i 

t 


; FUNCTION IS 

* 


A KILL I/O 


FUNCTION-FLUSH I/O QUEUE OF TASK REQUf 


FCKIL! 

t 


CALL 


$IOKIl 


.■FLUSH I/O QUfU( 



; TM097 



•••• M 4 •••« 



OWIO MACRO M1108 14-01C-77 19:59 PAGE 2-9 



DRQIO MACRO Ml 108 U-DEC-77 19:59 PAGE 2-9 



\\i 



516 
517 

518 000360 

519 000%A 



01270A 
000^05 



OOOOOOC 



525 000366 01?70A OOOOOOC 

526 000372 OOOA65 
527 



531 

532 00037A 

533 000*00 



539 

5<.0 000A02 



558 000402 

559 000404 

560 000406 

561 000410 

562 000412 
63 000414 
64 



012704 
000462 



012324 
012324 
012324 
012324 
012324 
011314 



OOOOOOC 



; FUNCTION IS A NOP'ED FUNCTION-DECLARE SUCCESSFUL COMPLETION STATUS 

• 

.ENABL LS8 ; TM097 

issue: MOV «IS.SUCft377,R4 .-SET SUCCESSFUL COMPLETION CODE 

BR 10$ ; ; TM097 

.••♦-1 

FUNCTION IS AN ILLEGAL FUNCTION-DECLARE ILLEGAL FUNCTION CODE STATUS 

lEIFC: MOV #IE.IFCi377.R4 ;SET ILLEGAL FUNCTION CODE 
BR lECMN 

SPECIFIED DEVICE IS OFFLINE 



lEOFL: MOV #IE.0FLl377.R4 ;SET DEVICE OFFLINE STATUS 
1CS: BR lECMN 
.DSABL LSB 



FUNCTION IS A CONTROL FUNCTION-COPY REMAINDER OF DPB 



FCCTL: 



;REF LABEL 



.IF DF AISNSI 



10»: 
FCXFR; 



TSI 

BPL 

BITB 

BNE 

BITB 

BEQ 

MOV 

BIT 

BEQ 

.ENDC 



MOV 
MOV 
MOV 
•WV 
«0V 
MOV 



U.CW1(R5) .-MOUNTABLE DEVICE? 

101 ;IF PL NO 

#US.MNT!US.F0R,U.STS(R5> .-MOUNTED AND NOT FOREIGN? 

10$ :1F NE NO 

«US.LAB.U.STS(R5) ;IS IT AN ANSI TAPE? 

10$ ;IF EQ NO 

$T>CTCB.RO .-POINT TO CURRENT TASK TC8 

#T3.PRV.T.ST3(R0) .-TASK PRIVILEGED? 

lEPRI ;IF EQ NO 



<R5)«.(R4)* 
(R3)*,(R4)* 
(R3)t,(R4)* 
(R3)».(R4)» 
(R3)»,(R4)* 
(R3).(R4} 



INSERT PARAMETER 1 

INSERT PARAMETER 

INSERT PARAMETER 

INSERT PARAMETER 

INSERT PARAMETER 5 

INSERT PARAMETER 6 



.IF DF 0$$IAG 



BITB flO.UMD.fSP) .-IS THIS A DIAGNOSTIC FUNCTION? 

BEQ 10$ ;!F £Q NO 

BIT *DV.UMD.U.Ctf1(R5^ ;DOES DEVICE SUPPORT DIAGNOSTICS? 



••*• ^ 4 *••« 



TM097 
TM097 
••-1 



1M097 
TM097 
TM097 
TM097 
TM097 
TM097 
TM097 
TM097 
TM097 
TM097 
TM097 
TM097 
TM097 
TM097 
TM097 
TM097 
TM097 
TM097 
TM097 
• ♦-1 



; TM098 



ORQIO MACRO M1108 U-DEC-77 19:59 PAGE 2-10 



L 



597 

598 000416 

599 000422 

600 000424 

601 0004SO 

602 0004S2 

603 000436 

604 000442 

605 000446 

606 000450 

607 000452 
60S 000456 

609 000460 

610 000464 

611 000466 

61 2 000470 

1 



lot: 



022726 OOOOOOG 

001021 

005765 OOOOOOG 

100016 

016703 OOOOOOG 

016300 000044 

020005 

001031 

066344 000042 

005544 

116300 000041 

060014 

005726 

012601 



rC<lT: 



BEQ 

CNPB 

BEQ 

CnPB 

BEQ 

BITB 

BEQ 

NOV 



10S ;IF 

1(SP),/»I0.ATT/256. ; 
101 ;IF 

1<SP),#I0.0Ef/256. 
10$ ;IF 



EQ NO 

IS THIS AN ATTACH FUNCTION? 
SKIP RELOCATION 
A DETACH FUNCTION? 



TM098 



FQ rES, 

:IS THIS 

EQ VES 
«US.UMD,U.ST2(R5) ;IS DEVICE ATTACHED FOR DIAGNOSTICS? 
lEPRI ;IF EQ NO, PRIVILEGE VIOLATION 
(R4).R0 iPICK UP REGISTER BUFFER ADDRESS 



.IF DF AISCHKinSMGE 

NOV «40.*2.R1 ;PICK UP NAX LENGTH 

CALL MCHCK .-ADDRESS CHECK REGISTER BUFFER 

BCS lESPC ;IF CS ADDHtSS CHECK FAILED 

.ENOC 



CALL IRELOC :RELOCATE REGISTER BUFFER 
NOV R1,(R4)« ; STORE K1SAR6 BIAS 
NOV Rr.(R4} ; STORE DISPLACEMENT 

;REF LABEL 

.ENOC 



CMP «IO.LOV,(SP)* ; IS THIS A LOAD OVERLAY FUNCTION? 

BNE FCXIT ;1N N€ NO 

TST U.CWKRS) ;M0UNTABLE DEVICE? 

BPL FCXIT ;IF PL NO 

NOV tTKTCB,R3 ;GET ADDRESS OF TCB OF CURRENT TASK 

NOV T.LDV(R3).R0 .'GET UCB ADDRESS OF LOAD DEVICE 

CALL MPLND ;NAP TO ACTUAL UCB ADDRESS 

CNP R0.R5 ;LOAD DEVICE UCB NATCH SPECIFIED UCB? 

BNE lEOVR * IF NE NO 

ADD T.LBNt1(R3).-<R4^ .-ADD IN LOW PART OF TASK LOGICAL 

ADC -(R4) .BLOCK NUNBER 

MOVB T.LBN(R3).R0 ;GET HIGH BYTE OF TASK LOGICAL BLOCK NUMBER 

ADD R0.(R4) .ADD IN HIGH PART 

TST (SP)» ; CLEAN STACK 

NOV (SP)*.R1 ;RETR1EVE ADDRESS OF I/O PACKET 



••-IDRQRQ-QUEUE I/O REQUEST 

THIS ROUTINE IS CALLED TO INSERT AN I/O PACKET IN A CONTROLLER QUEUE AND 
CALL THE DRIVER TO INITIATE ACTIVITY ON THE DEVICE. 

INPUTS) 



R1 'ADDRESS OF THE I/O PACKET. 
RS-ADDRESS OF THE UNIT CONTROL BLOCK. 

OUTPUTS: 

THE I/O PACKET IS PLACED IN THE CONTROLLER QUEUE AND ACTIVITV 






DRQIO MACRO •IIIOB U-OEC-77 19:59 PAGE ?-11 



IS INITIATED ON THE DEVICE. 

NOTE: R4 IS DESTROYED BY THIS ROUTINE. 



653 0O(K72 

634 0OOA76 

635 00050A 

636 000506 

637 000510 

638 0005U 
639 

At 



01650A OOOOOOG $DRQRQ::MOV 
132765 OOOOOOG 0000006 BITB 

BNE 

nov 

CALL 

10$: nov 



001003 
010A00 



011502 



A9 
650 

651 000516 
652 
653 
654 

655 000522 
656 
6 7 



016202 OOOOOOG 



670 

671 000526 01270A OOOOOOC 

672 0GO552 000405 
673 



I 



76 
677 

678 000534 012704 OOOOOOC 
>79 000540 000402 



U.SCB(R5),R4 ;GET ADDRESS OF STATUS CONTROL BLOCK 

/|rUC.QUE.U.CTL{R5) .-QUEUE PACKET BEFORE CALL? 

10S ;IF NE NO 

R4,R0 ;SET ADDRESS OF I/O QUEUE LISTHEAD 

SQINSP :QUEUE I/O PACKET IN DEVICE QUEUE 

(R5),R2 .-RETRIEVE ADDRESS OF DEVICE CONTROL BLOCK 



.IF DF LSSDRVIMSMGE 



20S: 



nov 

MOV 
BEQ 

nov 



.IFTF 

NOV 

.IFF 

CALLR 

.IFT 

CALL 

MOV 

RETURN 

.ENDC 



KISAR5,-(SP) ;SAVE APR5 
D.PCB(R2).R3 ;GET DRIVER PCB ADDRESS 
20S :IF EQ DRIVER IS PART OF EXEC 

P.REL(R3),KISAR5 ;MAP THE DRIVER 

; 



D.DSP(R2),R2 .'GET ADDRESS OF DRIVER DISPATCH TABLE 



aD.VINI(R2) ;CALL DEVICE INITIATOR 



aD.VlNI(R2) ;CALL DRIVER INITIATOR 
(SP)*. KISAR5 .-RESTORE APRS 



I 

; II LEGAL BUFFER ADDRESS SPECIFlED-t ECLARE ILI EGAL BUFFER STATUS 



lE^iPC: MOV #JE.SPCi377.R4 ;SE1 »LLEGAL BUFFER CODE 
BH lECMN 



; ILLEGAL LOAD OVERLAY UCB-DECLARE ILLEG/L LOAD OVERLAY FUNCTION STATUS 

; 

lEOVR: MOV #If .0VRI577.R4 .SET ILLEGAL LOAD OVERLAY CODE 
BR lECMN 

; 

; ILLEGAL BYTE COUNT OR ALIGNMENT-DECLARE ODD BYTE STATUS 



•*•• c 5 **** 



I 



685 0005A2 01270A OOOOOOC 

686 

687 

688 

689 

690 

691 

692 

693 

69<i 

695 

6% 

697 

698 

699 

700 

701 

702 

703 

70* 

705 

706 

707 

708 

709 

710 

711 

712 

713 

715 
716 
717 
718 
719 
720 
721 
722 
725 
724 
725 
726 
727 
728 
729 
730 

733 
73* 

73 



% 

739 
740 
741 



DEC-77 19:59 PAGE 2-12 






OOOOOOC lEBYT: MOV 


». .BYTi377,R4 ;SET ODD BYTE STATUS 




• IF DF 


AWCPS 




M 


lECMN 




; NO BUFFER SPACE AVAILABLE-SET NO BUFFER AVAILABLE STATUS 




lENOD: MOV 
BR 


#IC.NODW77,RA ;SET NO BUFFER AVAILABLE CODE 
lECMN 




; BAD PARAMET£R 


-SET BAD PARAMETER STATUS 




lEBAD: MOV 
■ft 


•lE.BADt377,RA ;SET BAD PARAMETER CODE 
lECMN 




• PRIVILEGE VIOLATION-SET PRIVILEGE VIOLATION STATUS 




.IFTF 

.IF DF 

lEPRI: MOV 
BR 


ASSCPS'DSSIAG 

(riE.PRIft377.RA ;SET PRIVILEGE VIOLATION CODE 
lECMN 


TMOSO 
1M080 

• TMOSO 

• TMOSO 
TMOSO 


.ENDC 
• IFT 




TMOSO 
TMOSO 
TMOSO 
TMOSO 
TMOSO 


; FILE ALREADY 


ACCESSED ON LUN-SET flLE ''.LRCADY ACCtiSStD Sr/iJSU 





lEALN: MOV #IE.ALN1377.P<. ;S«IT , uE ALREADY ACCESSED CODE 
BR lECMN 

NO FILE ACCESSED ON LUN-SET NO FILE ACCESSED STATUS 

lENLN: MOV *1E.NLNI377.R4 ;SET NO FILE ACCESSED '.TATUS 

lOMMON ERROR EXIT 



.IFTF 



•••• p 5 *«•« 



I KBnm t^tf^n m\M\m li-i\Er_9V 1 



Q.Ca BAAC 3-11 



ORQIO MACRO M1108 U-DEC-77 19:59 



016706 
012600 
00U02 



7A2 

7A3 0005A6 

7AA 000552 

7A5 00055A 

7A6 000556 

7A7 000562 010A00 

748 00056A 005001 

7A9 000566 012603 

750 000570 016305 

751 0005 7A 
752 

753 
75A 
755 
756 
757 
758 
759 
760 
761 
762 
763 
76A 
765 
766 
767 
768 
769 
770 
771 
77Z 
773 
77U 
771 
776 
777 
77i 
779 

^ 

782 

783 

% 

786 

787 

^ 

790 
791 

% 

798 



177226 



000010 



PAGE 2-13 




lECHN: 
10$: 


MOV MSTK.SP 
MOV (SP)*.RO 
BEQ 10S 
CALL SDEPKT 
MOV RA.RO 
CLR R1 
MOV (SP)*.R3 
MOV I.UCB(R3),R5 
CALLR SIOFIN 


■ BUILD 


AN I/O PACKET 




.IFT 


BDPKT: 


MOV #2*2. R1 
CALL OPPRM 



ATRBK: 



10S: 



MOV 

BEQ 

MOV 

MOV 

CALL 

BCS 

MOV 


(R3)».(R«)* 

MOVE 3 

R3,-(SP) 

#1.LGTH,R1 

SALOCB 

lENOD 

RO.aMSTK 


.IF DF 


MSSMGE 


MOV 


KISAR6.-(SP) 


.ENDC 




MOV 
MOV 
MOV 
MOV 
MOV 
MOV 


-(RA),R3 

RO.(RA)« 

RA.-(SP> 

RO.RA 

#6.-(SP) 

R3.R0 


.If OF 


ASSCHKIMSSMGE 


MOV 

CALL 

BCS 


#A,R1 

SACHCK 

lESPC 



.ENDC 



RESET STACK POINTER 

RETRIEVE ADDRESS OF SECONDARY CONTROL BLOCK 

IF EQ NONE 

ScALLOCATE SECONDARY CONTROL BLOCK 

SET FINAL I/O STATUS 

CLEAR SECOND I/O STATUS WORD 

RETRIEVE ADDRESS OF I/O PACKET 

RETRIEVE UCB ADDRESS 

FINISH OFF I/O OPERATION 



:SET LENGTH OF FILE ID BLOCK 
.•INSERT OPTIONAL FILE ID BLOCK 



BUILD ATTRIBUTE POINTER BLOCK 



.•ATTRIBUTE DESCRIPTOR BLOCK SPECIFIED? 

;IF EQ NO 

;SAVE ADDRESS OF NEXT DP6 WORD 

:SET LENGTH OF SECONDARY CONTROL BLOCK 

.•ALLOCATE SECONDARY CONTROL BLOCK 

:IF CS NO STORAGE AVAILABLE 

.•SAVE ADDRESS OF SECONDARY CONTROL BLOCK 



;SAVE CURRENT MAPPING 



.•RETRIEVE ADDRESS OF ATTRIBUTE DESCRIPTOR BLOCK 
.•SET POINTER TO SECONDARY CONTROL BLOCK 
.■SAVE ADDRESS OF NEXT WORD IN I/O PACKET 
;SET ADDRESS OF FIRST ATTRIBUTE POINTER 
.•SET MAXIMUM NUMBER OF ATTRIBUTE POINTERS 
;SET ADDRESS OF NEXT ATTRIBUTE DESCRIPTOR 



;SET SIZE OF ATTRIBUTE DESCRIPTOR 
.•ADDRESS CHECK ATTRIBUTE DESCRIPTOR 
;IF CS ADDRESS CHECK FAILURE 



•••• 



I $ •••• 



DMIQ MACRO M1108 U-DEC-'77 19:59 PAGF 2-U 



1 



DRQIO MACRO M1108 



799 
800 
801 
802 
803 
BOA 
805 
806 
807 
808 
809 
810 
811 
812 
813 
8U 
815 
816 
817 
818 
819 
820 
821 
822 
823 
824 
825 
826 
827 
828 
829 
830 
831 
832 
833 
834 
835 
836 
837 
838 
839 
840 
841 
842 
843 
844 
845 
846 
847 
848 
849 
650 
851 
852 
853 
854 

iss 



-OEC-77 19:59 


PAGE 2- 


■14 

.IF OF 


M$$MGE 








CALL 
ADD 


$RELOM 
#4.R3 


RELOCATE AND MAP ATTRIBUTE DESCRIPTOR 
POINT TO NEXT ATTRIBUTE DESCRIPTOR 






.IFF 










CMP 


(R3)*.<R3)* 


POINT TO NEXT ATTRIBUTE DESCRIPTOR 






.ENDC 








15$: 


MOVB 

BEQ 

CLR 

BIS6 

MOVB 

BNE 

MOV 

MOV 

.IF OF 


(R0)*,{R4)* 

20$ 

R1 

(R0)».R1 

R1,(R4)* 

15$ 

#256.*2.R1 

(RO) ,R0 

A$$CHK!n$$MGE 


INSERT ATTRIBUTE NUMBER 

IF EQ END OF ATTRIBUTE DESCRIPTOR BLOCK 

PICKUP SIZE OF ATTRIBUTE BLOCK 

INSERT LENGTH OF ATTRIBUTE BLOCK 

IF NE LENGTH OKAY 

SET LENGTH FOR ZERO CASE 

GET ADDRESS OF ATTRIBUTE BLOCK 






CALL 
BCS 


$ACHCK 
lESPC 


ADDRESS CHECK ATTRIBUTE BLOCK 
IF CS ADDRESS FAILURE 






.ENDC 








20$: 


CALL 

MOV 

NOV 

DtC 

B6T 

TST 

MOV 

.IF DF 


$RELOC 

R1.(R4)> 

R2.(R4)* 

(SP> 

10$ 

(SP)» 

(SP)*.R4 

M$$MGE 


RELOCATE ATTRIBUTE BLOCK ADDRESS 

INSERT RELOCATION BIAS 

INSERT ATTRIBUTE BLOCK ADDRESS 

ANY MORE SPACE IN POINTER BLOCK? 

IF GT YES 

CLEAN STACK 

RETRIEVE ADDRESS OF NEXT WORD IN I/O PACKET 



MOV (SP)«,KISAR6 
.ENDC 



.-RESTORE CURRENT MAPPING 



MOV (SP)«.R3 .RETRIEVE ADDRESS OF NEXT WORD IN DP6 
MOVE EXTEND AND ACCESS CONTROL WORDS INTO I/O PACKET 



MOVtSi MOV 
NOV 
NOV 



(R3)*.(R4)* 
(R3)*,(R4)» 
(R3)»,(R4)t 



INSERT EXTEND CONTROL WORDS 
INSERT ACCESS CONTROL WORD 



•••* f 5 •«•• 



DRQtO MACRO M1108 U-DEt-77 19:59 PAGF 2-15 



ORQIO MACRO Ml 108 U-OEC-77 19:59 PAGE 2-15 



856 
857 
858 
859 
860 
861 
862 
863 
864 
865 
866 
867 
868 
869 
870 
871 
872 
873 
874 
875 
876 
877 
878 
879 
880 
881 
882 
883 
884 
885 
886 
887 
888 
889 
890 
891 
892 
893 
894 
895 
896 
897 
898 
899 
900 
901 
902 
903 
904 
905 
906 
907 
908 
909 
910 
911 
912 



; INSERT OPTIONAL FILENAME BLOCK 



FILNM: MOV #13.*2.R1 
CALL OPPRM 
JMP a(R5)t 



SET LENGTH OF FILENAME BLOCK 
INSERT OPTIONAL FILENAME BLOCK 



INTERPRET REQUIRED BLOCK ADDRESS 



.ENASL LSB 
RQPP.M: MOV SP,R2 
BR 10$ 



:SET REQUIRED PARAMETER FLAG 



; INTERPRET OPTIONAL BLOCK ADDRESS 



OPPRM: CLR 

10S: MOV 

BEQ 



R2 

(R3)*.R0 

20S 



,IF DF AStCHKiMSSMGE 



CALL 
BCS 

.ENDC 



SACHCK 
lESPC 



CALL 

MOV 

MOV 

BR 

MOV 

BNE 

CLR 

RETURN 

.DSABL LSB 



SRELOC 

R1,(R4)» 

R2,(R4)* 

30i 

R2.(R4)« 

lEBAD 

(R4)* 



; CLEAR REQUIRED PARAMETER FLAG 
;GET ADDRESS OF CONTROL BLOCK 
;IF EQ NONE SPECIFIED 



: ADDRESS CHECK BLOCK 

;IF CS ADDRESS CHECK FAILURE 



RELOCATE BUFFER ADDRESS 
INSERT RELOCATION BIAS 
INSERT BLOCK ADDRESS 

PARAMETER REQUIRED? 

IF NE y£S 

CLEAR SECOND WORD 



20Si 
30t: 

; 

: FILL DISCONNECT PARAMETER BUFFER AND INTERLOCK LUN USAGE 



.IF DF MtSNET 



.ENABL LSB 
CKDIS: MOV (R3)».(R4>» 



8* 



;COPY FIRST PARAMETER TO I/O PAIKET 
.-FINISH IN COMMON CODE 



; CHECK CONNECT PARAMETER BUFFER 
i 



«••• 



TT 



•••• 



DRQIO MACRO M1108 14-DEC-77 19:59 PAGF 2-16 



CKDMO: BITB 
BNE 



ORG 10 MACRO Ml 108 U-DEC-77 19:59 PAGE 2-16 



913 
9U 
915 
916 
917 
918 
919 
920 
921 
922 
923 
924 
925 
926 
927 
928 
929 
930 
931 
932 
933 
93A 
935 
936 
937 
938 
939 
94.0 
9«1 
9A2 
9*3 
94A 
945 
946 
947 
948 
949 
950 
951 
952 
953 
954 
955 
956 
957 
958 
959 
960 
961 
962 
963 
964 
965 
966 
967 
968 
969 



PAGE 2-16 








CKCON: 


MOV 


2(R3).R1 


GET LENGTH OF BUFFER IN BYTES 




BEQ 


lESPC 


IF EQ ZERO LENGTH 




CALL 


RQPRM 


INSERT REQUIRED PARAMETER 


lOli 


NOV 


{R3)*.(R4)* 


INSERT LENGTH OF PARAMETER BUFFER 






(R3)«,(R4)^ 


COPY REMAINDER OF PARAMETERS 




HQV 


(R3)*,(R4)* 






J|DV 


(R3)t.(R4)t 






MOV 


(R3),(R4) 






JHP 


a(R5)* 






.OSABL 


LSS 






.ENDC 






• 

; CHECK 

: 


FOR VOLUME MARKED FOR DISMOUNT 



#US.MOM.U.ST$(RO) .-VOLUME MARKED FOR DISMOUNT? 
lEPRI ;IF NE YES 
8(R5)* ; 



CHECK FOR READ ACCESS PRIVILEGES AND EXIT TO TRANSFER FUNCTION 



CrRAC I 



.ENABL LS6 

MOV «WI.RDV.R2 ;SET READ ACCESS MASK WORD 

8R 10S 



; CHECK FOR WRITE ACCESS PRIVILEGES AND EXIT TO TRANSFER FUNCTION 



CKWAC: 
IDS: 



MOV 
MOV 



iVWI.WRV.R2 
(SP)*.R1 



Mil 



; 



.IF DF MStMGE 

CLR 2(SP) 
.ENDC 



mt (SP)t.R5 

JMP FCTRN 
.DSABL LSa 



.-SET WRITE ACCESS MASK WORD 
.-RETRIEVE ADDRESS OF SECOND LUN WORD 



.-SET ACP VIRTUAL FUNCTION FLAG 



.DESIRED ACCESS PERMITTED? .' 
IF NE YES 

PRIVILEGE VIOLATION 
RETRIEVE UCB ADDRESS 
TREAT AS A TRANSFER FUNCTION 



; CHECK FOR FILE ALREADY ACCESSED ON LUN 



.ENABL LS8 



•••• M 5 •••• 



ORQIO MACRO Ml 108 U-DFC-77 19:59 PAGE ?- 17 



1 



DRQIO MACRO M1108 U-DEC-77 19:59 PAGE 2-17 



970 

971 

972 

973 

97A 

975 

976 

977 

978 

979 

980 

981 

982 

983 

98A 

985 

986 

987 

988 

989 

990 

991 

992 

993 

99A 

995 

996 

997 

998 

999 

1000 

1001 

1002 

1003 

1004 

1005 

1006 

1007 

1008 

1009 

1010 

1011 

1012 

1013 

10U 

1C* 

If.: J 

1017 
1018 
1019 

181? 

m 



CKALN: TST 
BEQ 



(R1) 

IDS 

lEALN 



CHECK FOR FILE ACCESSED ON LUN 



:KNLN: TST (R1) 
BNE 10S 
JMP lENLN 



FILE ACCESSED ON LUN? 

IF EQ NO 

ERROR 



FILE ACCESSED ON LUN? 

IF NE YES 

ERROR 



CHECK IF ACCESS ALSO REQUESTED ON CREATE 



CKACC: TST 10(R3) 

BPL IDS 

MOV #FCCAW.R5 

loit jm a(R5)« 

.DSAflL LSB 



ACCESS REQUESTED? 

IF PL NO 

POINT TO ACCESS POLISH 



SET UP REGISTERS FOR UNLOCK AND EXIT TO CONTROL FUNCTION 



.IF DF RStLKL 



UNLXT: CMP 



» 



(R«)»,(SP)» 

(SP)*.R5 

FCCTL 



ADVANCE PACKET POINTER AND CLEAN STACK 

RESTORE R5 

SET UP REST OF PACKET 



.ENDC 



TM075 
TM075 
TM075 
TM075 
1M075 
TM075 
TM075 
TM075 
rM075 
TM075 
TM075 
TM075 
TM075 
TM075 



SET ACCESS/DEACIESS INTERLOCK 



CKRLK: INC 



a(SP) 



EXIT POLISH TO FUNCTION EXIT 



CKXIT: TST 



.ENDC 



(SP)» 

(SP)t.(SP) 

(SP)»,R5 

•U.VC8(R5) 

FCXIT 



.'SET ACCESS/DEACCESS PENDING INTERLOCK 



REMOVE ADDRESS OF SECOND LUN WORD 
REMOVE FUNCTION CODE FROM STACK 
RETRIEVE UCB ADDRESS 
INCREMENT VOLUME TRANSACTION COUNT 
EXIT POLISH 



000001 



.END 



t*** 



I 5 •••• 



DRQIO MACRO Ml 108 U-Dft-77 19; 59 PAGE ?-18 



DRQIO MACRO Ml 108 
SYMBOL TABLE 



H-DEC-77 19:59 PAGE 2-18 



AS. DEL = 

AS.EXT= 

AS.REO- 

AS.WRT- 

A.AST 

A.BVT 

A.CBL 

A.DQSR 

A. IOC 

A.KSR5 

A.LGTH= 

A.MPCT 

A.NPR 

A.PCB 

A.PCBL 

A.PRI 

A.PRM 

A.STAT 

A.TCB 

A.TCBL 

C$SORE« 

O.DSP » 

D.nSK * 

0.RS5 « 

D.VINI 

FCCTL 

FCKIL 

FCTRN 

FCXFR 

FCXIT 

FC.CEF« 

FC.OIR« 

FC.FCO* 

FC.WAC« 

FE.CAL- 

FE.CEX- 

FE.ORV* 

FE.EKP- 

FE.EK'« 

FE.EXV 

FE.LSI» 

FE.MUP- 

FE.«XT« 

FE.NLG< 

FE.PKT« 

FE.PLA- 

F.DREF 

F.DRMM 

F.FEXr 

F.FNUM 

F.FOWN 

F.FPW 

F.FSEQ 

F.FSQN 

F.FVBN 

F.H0L8 

F.IBN 



000010 
000004 
000001 
000002 
000006 
OOOOOA 
000002 
177776 
000003 
17777A 
OOOOU 
000011 
000010 
000012 
000000 
000002 
000012 
000010 
000004 
000006 
000400 



000402R 
000354R 
000336R 
000404R 
000466R 
020000 
040000 
010000 
100000 
000040 
020000 
000010 
000200 
II 



GX 
GX 
GX 
GX 



000400 

oooool 

040000 

000100 
000020 
000036 
000040 



000010 
000012 
000004 

mi 

000016 
000022 



F.LGTH 000052 
F.LINK 000000 
F .LKL 000050 
F.NACS 000032 
F.NLCK 000033 
F.NVAC 000034 
F.SCHA 000015 
F.SIZE 000026 
F.STAT 000034 
F.UCHA 000014 
HtSRTZ' 000074 
lEBVT 000542R 
lECMN 000546R 
lEIFC 000366R 
lEOfL 000374R 
lEOVR 000534R 
lESPC 000526R 
IE.BYT» •♦••*• GX 
IE.1FC» •»•••♦ GX 
IE.0FL« ••••*♦ GX 

1E.0VR« •••••• GX 

IE.SPC« •••••• GX 

I0.L0V« •••♦•♦ GX 
10.RLB» •••••♦ GX 

lO.RVB" •••••• GX 

lO.WLB* •*•••• GX 

issue 000360R 
IS.SUC= •»••♦* GX 
LAST 000022 
I.ATTL> 000044 
I.EFN 000003 
I.FCN 000012 
t.IOSB 000014 
I.LGTH* 000044 
I. INK 000000 
1.LN2 000006 
I.PRI 000002 
I.PRM 000024 
I.TC8 000004 
I.UCB 000010 
XftCNT- 177546 
KIICSR« 177546 
KIIIEN* 000115 
KtlLDC* 000001 
XIITPS- 000074 
L.CNT 000005 
L.LGTH 000010 
L.LNK 000000 
L.V81 QQQ0Q4 
L.wn 000002 
MPAR . 172100 
MPCSR « 177746 
MSTK OOOOOOR 
NttCRB' 0QQ124 
PfRQ » 1»7>2 



PR4 = 
PR5 = 
PR6 = 
PR7 = 
PS = 
PS.APR= 
PS.CWCs 
PS.CKP« 
PS.CKR* 
PS. COM 
PS.DEL= 
PS.DRV= 
PS.FXO^ 
PS.LI0= 
PS.NSFs 
PS.0UT« 
PS.PERs 

rs.Pic= 

PS.SVS» 

P.BLKS 

P. BUSY 

P. IOC 

P.LNK 

P.MAIN 

P. NAM 

P.OVN 

P.PRI 

P.REL 

P.SIZE 

P.STAT 

P. SUB 

P.SWSZ 

P.TCB 

P. WAIT 

RUF11> 

RtlJP0> 

RSSJP1' 

RStJSI- 

RtlKl1> 

RtlP11> 

RttXl1< 

Rtl11M> 

Rtt11S> 

SWR « 

SISECC* 

StSVS/> 

S.STBK* 

TPS • 

TS.BLK* 

TS.CJCP« 

TS.CKR« 

TS.EXE* 

TS.«SG= 

TS.NRP« 

TS.OUT* 

TS.RDN* 

rS.RUN' 



000200 

000240 

000300 

000340 

177776 

000007 

010000 

040000 

020000 

000200 

000010 

000020 

004000 

001000 

000400 

100000 

00?00 

000100 

000040 

000016 

000024 

000003 

000000 

000012 

000004 

000026 

000002 

000014 

000016 

000030 

000010 

000022 

000026 

000020 

000001 

000000 

000001 

000001 

000001 

000001 

000001 

000000 

000000 

177? 70 

000000 

001000 

000012 

177564 

170700 

000200 

000100 

100000 

w 

000400 

'40000 

04000 



T$$A11= 


000001 


U.CW1 = 


****** GX 


Tt$C11= 


000001 


U.SCB = 


••*♦♦♦ GX 


T$»J16=^ 


000001 


U.ST2 * 


****** GX 


Tt$ICMG= 


000000 


VC.BMWs 000002 


T$M11 = 


000001 


VC.IFW= 


000001 


T.ACTL 


000052 


VMCTR* 


000400 


T.ASTL 


000016 


V.FCB 


000004 


T.ATT 


000C54 


V.FFNU 


000045 


T.CPCB 


000004 


V.FIEX 


000023 


T.DPRI 


000040 


V.FNAX 


000014 


T.EFLG 


000022 


V.FPRO 


000034 


T.IOC 


000003 


V.FRBK 


000040 


T.LBN 


000041 


V.IBLB 


000010 


T.LDV 


000044 


V.IBSZ 


000011 


T.LNK 


000000 


V.IFWI 


000002 


T.MXSZ 


000050 


V.L6TH 


000046 


T.NAM 


000006 


V.LRUC 


000041 


T.OFF 


000060 


V.SBCL 


000017 


T.rcb 


000046 


V.S6LB 


000022 


T.PRI 


000002 


V.SBSZ 


000020 


T.RCVL 


000012 


V.STAT 


000044 


T.RRFL 


000064 


V.TRCT 


000000 


T.SRCT 


000063 


V.VCHA 


000032 


T.STAT 


000032 


V.VFSQ 


000036 


T.ST2 


000034 


v.voyN 


000026 


T.ST3 


000036 


V.VPRO 


000030 


T.TCBL 


000030 


V.WISZ 


000016 


T.UCB 


000026 


W1.BPS= 


100000 


T2.AB0« 


000100 


WI.DLK> 


010000 


T2.AST. 


100000 


WI.EXL* 


040000 


T2.BFX= 


004000 


WI.EXT* 


002000 


T2.CAF= 


000400 


WI.LCK» 


004000 


T2.CH(C« 


020000 


UI.RDVo 


000400 


T2.CK0« 


010000 


WI.WRV< 


001000 


T2.DST« 


040000 


W.CTL 


000000 


T2.FX0» 


002000 


W.FCB 


000006 


T2.HLT' 


000200 


W.LKL 


000010 


T2.SPN» 


000004 


W.RTRV 


000012 


T2.STP": 


000020 


U.VBN 


000002 


T2.T10r 


001000 


U.WISZ 


000003 


T2.WFRS 


000001 


$ALPKT= 


****** GX 


T3.ACP« 


10000( 


$8TMSK= 


****** GX 


T] .CAL = 


0001 0( 


»CEF1 = 


****** GX 


Tl .CLI' 


00100(1 


KEFN = 


****** GX 


T] .MCR= 


004000 


IDfPKT= 


****** GX 


T!.NETr 


00002(' 


SDRQIO 


000002RG 


T! .NSO« 


000200 
040000 


tDRQRO 


0004 72RG 


T! .PMO« 


tDRWFS* 


****** GX 


T: .PRV« 
t! .REM« 


OlOOOj 


II0FIN« 


****** GX 


IIOKIL* 


.*..** GX 


t; .ROV- 


00 i04( 


MPIND* 


****** GX 


T .RST. 


oa40( 


IMPLUN- 


GX 


TLSLVr 


00200(' 


tQINSP= 


GX 


UC.QUE* 


****** GX 


tRELOC= 


GX 


US.OFL» 


6X 


ITMCB= 


...... GX 


U.CTL » 


••**•• GX 


ITKWSE> 


*.**** GX 



#••• 



TT 



•••• 



n 



ORQIO MArRnM110« U-rrC-77 19i59 PAGF 2-19 



DRQIO MACRO MIIOB U-DEC-77 19:59 PAGE 2-19 
SYMBOL TABLE 

. ABS. 177776 000 

000600 001 

ERRORS DETECTED: 

VIRTUAL MEMORY USED: 5265 WORDS ( 21 PAGES) 
DYNAM'C MEMORY: 157AA WORDS ( 60 PAGES) 
ELAPSkD TIME: 00:00:32 

CA1.20]DRQ10,SYO:CA1.303DRQ10/-SP=C1.1]EXEMC/ML.C<.1.10]RSXMC.C11.10]DRQIO 
8 



*••• K 5 •«•• 




••*• I 5 tttt 



OKWS NACHO Wn08 U-OfC-77 ?0:00 PAGF ? 



1 



ORRAS MACRO Ml 108 U-OEC-77 20:00 PAGF 2 



36 

37 000000 

38 000000 
39 



.TITLE ORRAS 
.IDENT /07/ 



COPYRIGHT (C) 197A. 1978 

DIGITAL EQUIPMENT CORPORATION, NAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 07 

D. N. CUTLER *-SEP-73 

PREVIOUSLY MODIFIED BY: 

T. J. MILLER 
MODIFIED BY: 

T. J. MILLER 26-MAY-77 

TM086 — MODIFY TO USE COMMON EVENT FLAG SETTING 
ROUTINE. 

T. J. MILLER 17-SEP-77 

TM107 — ADDITION OF SUPPORT FOR RECEIVE FROM SPECIFIED 
TASK. 

RECEIVE AND SEND DIRECTIVES 

MACRO LIBRARY CALLS 



.MCALL 
HDRDFS 
TCBDFS 



HDRDFS, TCBDFt 



;DEF1NE TASK HEADER OFFSETS 
.■DEFINE TASK CONTROL BLOCK OFFSETS 



•'-SORREC-RECEIVE DATA AND RECEIVE DATA OR EXIT 

THESE DIRECTIVES INSTRUCT THE SYSTEM TO DEQUEUE A DATA BLOCK FROM THE 
ISSUING TASK'S RECEIVE QUEUE. IF *HE DIRECTIVE IS RECEIVE DATA OR EXIT, 
THEN A TASK EXIT WILL BE EFFECTED IF NO DATA IS QUEUED. 



DPS FORMAT: 
WO. 00 



WO. 01 



DIC(75. OR 77. ),DPfl SIZE(*.). 
- FIRST HALF OF SENDER TASK NAME OR FOR ANY TASK. 
SECOND HALF OF SENDER TASK NAME. 
ADDRESS OF A FIFTEEN WORD RECEIVE BUFFER. 



TM107 
rM107 
••-2 



iNPUTS: 



R2*ADDRESS OF THE lASK STATUS WORD OF THE CURRENT TASK. 
R5«ADDRESS OF THE SECOND WORD IN THE OPB. 



•••• M 5 



••t* 



ORRAS MACRO M1108 U-OEC-77 ?0!00 PAGE ?-1 



DRRAS MACRO mi08 H-OEC-77 20:00 PAGE 2-1 



RA>ADDRESS OF THE HEADER OF THE CURRENT TASK. 
R5=AD0RESS PF IHE TCB OF THE CURRENT TASK. 

OUTPUTS: 'OlRECTlVt STATUS AND PS RETURNED TO TASK) 

I C«C »F DIRECTIVE IS SUCCESSFULLY COMPLETED. 

; DIRECTIVE STATUS OF ♦! IS RETURNED. 

; C«l IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RSS' IS RETURNED IF NO DATA 
IS QUEUED IN TASK'S RECEIVE QUEUE. 



St: 



4t: 



.IF DF RISSND 



$DRREC::nCV 
MOV 
MOV 
MOV 



MOV 
CALL 

.ENOC 



MOV 
MOV 
MOV 
MOV 
ADD 
MOV 
MOV 
BEO 
TST 
BEQ 
CMP 
BNE 
CMP 
BNE 
CALL 



BIT 
BEQ 

MOV 
MOV 
MOV 
MOV 
MOV 

.INOC 



-2(R3).-(SP) 
(R3)t,-(SP) 
(R3)*,-(SP) 
(R3),R3 



.IF DF ASSCHKiMSSMGE 



#15.»2.R1 
tACHKP 



R3.RA 

(SP)*.R3 

(SP)*.R2 

RS.RO 

fT.RCVL.RO 

RO.RI 

(R1),R1 

201 

R2 

4t 

2(R1),R2 

31 

4(R1>,R3 

SI 

tORMVT 



SAVE Die CODE OF DIRECTIVE 
SAVE FIRST HALF OF SENDER TASK NAME 
SAVE SECOND HALF OF SENDER TASK NAME 
GET ADDRESS OF RECEIVE BUFFER 



.-SET SIZE OF BUFFfR 

.•ADDRESS CHECK RECEIVE BUFFER 



SAVE ADDRESS OF RECEIVE BUFFER 

RETRIEVE 2ND HALF OF SENDER TASK NAMF ; 

RETRIEVE FIRST HALF OF SENDER TASK NAME; 

CALCULATE ADDRESS OF TASK RECEIVE 

QUEUE LISTHEAD 

COPY LISTHEAD ADDRESS 

POINT TO NEKT ENTRY IN RECEIVE LIST 

IF EQ THERE IS NONE 

TASK NAME SPECIFIED? 

IF EQ NO. DEQUEUE FIRST BLOCK 

MATCH ON FIRST WORD OF TASK NAME? 

IF NE NO 

MATCH ON SECOND WORD OF TASK NAME? 

IF NE NO 

DEQUEUE THE APPROPRIATE PACKET 



TM107 
TM107 
TM107 
TN107 
••-2 



TM107 
TM107 



TM107 
TM107 
TM107 
TM107 

TMior 

TM107 
TM107 
TM107 
TM107 
TM107 



.IF DF MttMUP 



#T3.S'.V.T.STS(R5) ;IS RECEIVER A SLAVE TASK? 



5* 



4Q(M),R0 

RO f.uce 



\i EQ NO 

PICK UP Tl ADDRESS 

SET TI ADDRESS OF RECEIVER 

PICK UP CURRENT TASK HEADFR ADDRESS 



t6(R5> 
lMcADR.R2 , 

42(R1),H.CUIC(R2) .SET CURRENT UIC Of RECEIVER 
«2(R1),H.r)'JlC(R?) ;SFT DEFAULT UlC OF RECEIVER 



•••• N 5 **** 



DRRAS MACRO Mil 08 U-DEC-77 20:00 PAGE 2-2 



1/ 



5S: 


MOV 


R1.R0 
(R1)*.{SP)* 




CMP 




MOV 


#15..R2 


"OS; 


MOV 


(R1)*,(R«)» 




DEC 


R2 




BGT 


10S 




CALLR 


SDEPKT 


20$: 


CMPB 


#77..{SP)» 




BNE 


30$ 




JMP 


$DREXT 


30$: 


DRSTS 


D.RS8 



:SAVF ADDRESS OF ENTRY REMOVED 

.•POINT TO SENDER TASK NAME AND CLEAN STA 

.-SET LOOP COUNT 

.'MOVE DATA BLOCK TO TASK BUFFER 

:ANY MORE yORDS TO MOVE? 

.IF GT YES 

.■DEALLOCATE RECEIVE QUEUE PACKET 

.-RECEIVE DATA OR EXIT DIRECTIVE? 

;IF NE NO 

;EXIT TASK 

;SET DIRECTIVE STATUS 



••-$D«»SNO-SEND DATA 



THIS DIRECTIVE INSTRUCTS THE SYSTEM TO QUEUE A THIRTEEN yORD DATA BLOCK 
IN A SPECIFIED TASK'S RECEIVE QUEUE. 



DP6 FORMAT: 



WD. 00 

yo. 01 
WD. 02 
WD. OS 
WD. 04 - 



- DIC(71.),DP8 SIZE(5.). 

- FIRST HAf.F OF RECEIVER TASK NAME. 

- SECOND HALF OF RECEIVER TASK NAME. 

- ADDRESS OF THIRTEEN WORD DATA BLOCK. 
EVENT FLAG NUMBER (OPTIONAL). 



INPUTSi 



RO-ADDRESS OF THE TCP OF THE RECEIVER TASK. 

R1>ADDRESS OF THE TASK STATUS WORD OF THE RECEIVER TASK. 

R2>ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3>ADDRESS OF THE DATA BLOCK ADDRESS IN THE DPB. 

R4>ADDRESS OF THE HEADER OF THE CURRENT TASK. 

RS'ADDRESS OF THE TCB OF THE CURRENT fASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

i C>0 IF DIRECTIVE IS SUCCESSFULLY COMPLETFD. 

I DIRECTIVE STATUS OF ^1 IS RETURNED. 

I C>1 IF DIRECTIVE IS REJECTED. 

I DIRECTIVE STATUS OF 'D.RSV IS RETURNED IF INSUFFICIENT 

I CORE IS AVAILABLE TO QUEUE THE DATA BLOCK. 

I DIRECTIVE STATUS OF *D.RS2' IS RETURNED IF RECEIVER 

t TASK IS AN ANCILLARY CONTROL PROCESSOR. 



$DRSND::BIT 
BNE 
MOV 
MOVB 
MOV 



#T3.ACP!T3.NSD.T.ST3(RO) .SENDS ALLOWED TO RCCEIVPR? 



20$ 
RO.-(SP) 
2(R3).-(SP) 
(R3).R3 



;IF NE NO 

.SAVE TCB ADDRESS OF RECEIVER TASK 

.SAVE EVENT FLAG NUMBER 

;GET ADDRESS OF DATA BUFFER 



.IF DF A$$CHK!M$$MGE 



•••• I A ftttt 



ORRAS MACRO Ml 108 U-OEC-77 20:00 PAGE 2-3 



IDS: 



20S: 



000001 



MOV 
CALL 

.ENDC 



MOVB 
CALL 
CALL 



MOV 
MOV 

.ENDC 



MOV 

MOV 

TST 

MOV 

MOV 

MOV 

MOV 

DEC 

BGT 

MOV 

ADD 

CALL 

MOV 

MOV 

CALL 

CALIR 

DRSTS 

.ENDC 



.END 



*13.»2.R1 
SACHKP 



(SP)+,RO 

SSETF 

»ALPKT 



.SET SIZE OF BUFFER 
.-ADDRESS CHECK DATA BUFFER 



.-RETRIEVE OPTIONAL EVENT FLAG NUMBER 
.-SET THE EVENT FLAG 
.-ALLOCATE SEND PACKET 



; TM086 

,♦•-2 



.IF DF MSSMUP 



T.UCB(R5).A0(R0) :SET UCB ADDRESS 
M.CUIC(RA},42(R0) ;SEt CURRENT (PROTECTION) UK 



R3,R4 

R0.R1 

(RO)* 

T.NAM(R5)-(R0)» 

T.NAM*2(R5).(R0) 

#13., R2 

(R4)*,(R0)* 

R2 

10S 

(SP).RO 

#T.RCVL.RO 

SQINSF 

#H.RCVA.R4 

(SP)*,R5 

tDASTT 

SDRDSE 

D.RS2 



.-SAVE ADDRESS 0'^ DATA BUFFER 
.-COPY ADDRESS OF ALLOCATED PACKET 
; POINT TO SECOND WORD OF PACKET 
.-INSERT SENDER TASK NAME IN SEND PACKET 

.-SET LOOP COUNT 

.-MOVE DATA TO SEND PACKET 

;^NY MORE WORDS TO MOVE? 

;IF GT YES 

; CALCULATE ADDRESS OF RECEIVER TASK'S 

.RECEIVE QUEUE LISTHEAD 

.-INSERT SEND PACKET IN RECEIVE QUEUE 

:SET OFFSET TO AST CONTROL BLOCK IN HEADER 

.-RETRIEVE RECEIVER TASK TCB ADDRESS 

.-DECLARE RECEIVE AST 

.'DECLARE A SIGNIFICANT EVENT 

;SET DIRECTIVE STATUS 



••t* c 6 ***• 



DRRAS MACRO Mil 08 
SYMBOL TABLE 



U-OEC-77 20:00 PAGE 2-A 



CttORE= 


OOOAOO 


H.RRVA 


000062 


H»»RTZ= 


00007A 


H.SPRI 


000060 


H.CSP 


000000 


H.TKVA 


000026 


H.CUIC 


000010 


H.TKVL 


000030 


H.DSW 


0000A6 


H.VEXT 


000056 


H.DUIC 


000012 


H.WND 


OOOOAA 


H.EFLM 


OOOOOA 


W$CNT= 


1775A6 


H.EFSV 


OOOOAO 


ICSSCSR» 


177546 


H.FCS 


000050 


Kt$IEN» 


000115 


H.FORT 


000052 


KiSLDC* 


000001 


H.FPSA 


000042 


K$tTPS> 


000074 


H.FPVA 


00003A 


MttCRBs 


000124 


H.GARD 


000072 


RSSFII* 


000001 


H.HDLN 


000002 


RtSJP0> 


000000 


H.IPC 


000016 


RSSJPIs 


000001 


H.IPS 


OOOOU 


RSSJSI- 


000001 


H.ISP 


000020 


RttKll' 


000001 


H.LUN 


000076 


RttP11< 


000001 


H.NLUN 


00007A 


R$$X11» 


000001 


H.NML 


000061 


RSt1in> 000000 


H.OOVA 


000022 


RS»11S« 


000000 


H.OOVL 


00002A 


S$»ECC» 


000000 


H.OVLY 


000054 


S»$YSZ« 


001000 


H.PFVA 


000032 


TS.BLK= 


170700 


H.RCVA 


000036 






. ABS. 


000102 


000 






000000 


001 




ERRORS 


DETECTED: 








TS.CKP= 

TS.CKR= 

TS.EXE= 

TS.MS6= 

TS.NRP= 

TS.OUT= 

TS.RDN= 

TS.RUN= 

T$IA11« 

TS$C11= 

TSSJ16» 

TSSKNG- 

TSSnil:: 

T.ACTl 

T.ASTL 

T.ATT 

T.CPCB 

T.DPRl 

T.EFL6 

T.IOC 

T.LRN 

T.LDV 

r.LNK 

T.MXSZ 



000200 
000100 
100000 
020000 
010000 
000400 
040000 
004000 
000001 
000001 
000001 
000000 
000001 
000052 
000016 
G00054 
000004 
000040 
000022 
000003 
000041 
000044 
000000 
000050 



T.NAM 

T.OFF 

T.PCB 

T.PRl 

T.RCVL 

T.RRFL 

T.SRCT 

T.STAT 

T.ST2 

T.ST3 

T.TCBL 

T.UCB 

T2.AB0- 

T2.AST» 

T2.BFX': 

T2.CAFe 

T2.CHICS 

T2.CKD= 

T2.0ST" 

T2.FX0= 

T2.HLT= 

T2.SPN" 

r2.STP» 

T2.TI0= 



000006 
000060 
000046 
000002 
000012 
000064 
000063 
000032 
000034 
000036 
000030 
000026 
000100 
100000 
004000 
000400 
020000 
010000 
040000 
002000 
000200 
000004 
000020 
001000 



VIRTUAL MEMORY USED: 2685 WORDS ( 11 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:13 

C41.20]0RRAS,SY0:C41,30]DRRAS/-SP=C1.1JEXEMC/ML.C41J03RSXMC.C11.10]0RRAS 
X 



T2.WFRS 

T3.ACP= 

T3.CAL= 

T3.CLI= 

T3.MCR= 

T3.NET= 

T3.NSD= 

T3.PM0= 

T3.PRV= 

T3.REM= 

T3.R0V= 

T3.RST= 

T3.SLV» 

VSSCTRs 

W.BATT 

W.BFPD 

W.BHVR 

W.BLGH 

W.BLPD 

W.BLVR 

W.BNPD 

W.BOFF 

W.BPCB 

W.BSI7 



000001 
100000 
000100 
001000 
004000 
000020 
000200 
040000 
010000 
OcOOOO 
000040 
000400 
002000 
000400 
000006 
000014 
000004 
000020 
000016 
000002 
000015 
000012 
000000 
000010 



••*• p 6 #••• 



rrr 




•••• E A ••«• 



MArr. MArnn miQii 14-dfc-77 ?0:00 pagf i 



1 



DRREG MACRO Ml 108 U-OEC-77 20:00 PAGE 2 



20 



.TITLE DRREG 
.IDENT /01/ 



COPYRIGHT (C) 1976. 1978 

DIGITAL EQUIPMENT CORPORATION. MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 01 

T. J. MILLER 12-MAR-76 

MODIFIED BY: 

T. J. MILLER 7-DEC-76 

TM069 — ADD CHECK FOR OUTSTANDING TERMINAL I/O. 



•••• f A •#•• 



Mft»r. MArttn mi ion U-dfc-77 POiOO PAGF S 



1 



ORREG MACRO MHOS U-DEC-77 20:00 PAGE 3 



22 
23 
2A 
25 
26 
27 
28 
29 
30 
31 
32 
33 
3A 
35 
36 
37 
38 
39 
AO 
A1 
42 
A3 
AA 
A5 
A6 
A7 
A8 
A9 
50 
51 
52 
53 
5A 
55 
56 
57 
58 
59 
60 
61 
62 
63 
6A 
65 
66 
67 
68 
69 
70 
71 

7A 
75 
76 
77 
78 



THE FOLLOWING DIRECTIVES RECEIVE AS INPUT A POINTER TO A REGION DEFINITION 
BLOCK WHICH SERVES AS A COMMUNICATION AREA BETWEEN THE ISSUING TASK AND 
THE EXECUTIVE. THE REGION DEFINITION BLOCK HAS THE FOLLOWING FORMAT: 



R.GID 



R.GSIZ 



R.GNAM 



REGION ID 



SIZE OF REGION (32W BLOCKS) 



NAME OF :)EGION (RADSO) 



! i 

R.GPAR ! REGION'S MAIN PARTITION NAME (RADSO) J 
I I 



••»——>•—>•—•-••-•———.•—•—.-_•—_—_ I 



R.GSTS 



R.GPRO 



REGION STATUS WORD 



»——»<••-•-•—•••••••-••______••.-_••••_— I 



PROTECTION CODE OF REGION 



000001 



GLOBAL SYMBOL DEFINITION 

DEFINE fDETRG FOR MCR IF PLAS IS NOT SELECTED 

.IF NDF PItLAS 

I0ETR6"1 

.IFF 

; MACRO LIBRARY CALLS 



;SET TO TRAP IF REFERENCED 



••*• Q ( •••• 



bRRFG MACRO M1108 U-DEC-77 20:00 PAGF 3-1 



DRREG MACRO MHOS U-DEC-77 20:00 PAGE 3-1 



79 

80 

81 

82 

83 

8A 

85 

86 

87 

88 

89 

90 

91 

92 

93 

9A 

95 

96 

97 

98 

99 

100 

101 

102 

103 

104 

105 

106 

107 

108 

109 

110 

111 

112 

lis 

1U 
115 
116 
117 
118 
119 
120 
121 
122 
123 
124 
125 
126 



.nCALL HDRDF$,PCBDFS,RDBDF$,TCBDF$ 

HDRDFS .-DEFINE HEADER AND WINDOW BLOCK OFFSETS 

PCBDFI ;DEFINE PCS AND ATTACHMENT DESCRIPTOR OFFSETS 

RDBDFS .-DEFINE REGION DEFINITION BLOCK OFFSETS 

TCBDFS .-DEFINE TCB OFFSETS 

••-SDRCRR-CREATE REGION 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO CREATE A REGION AND OPTIONALLY 
ATTACH TO IT. 



DPB FORMAT: 



WD. 
WD. 



00 — DIC(55.).DPB S1ZE(2.) 

01 — ADDRESS OF REGION DEFINITION BLOCK 



INPUTS: 



R2<ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 
R3*ADDRESS OF THE REGION DEFINITION BLOCK. 
R4*ADDRESS OF THE HEADER OF THE CURRENT TASK. 
R5«ADDRESS OF THE TCB OF THE CURRENT TASK. 

INPUT FIELDS IN THE REGION DEFINITION BLOCK ARE: 
R.GSIZ'SIZE OF REGION TO CREATE. 
R.GNAM*NAME OF REGION TO CREATE OR FOR NO NAME. 
R.GPAR'NAME OF SYSTEM PARTITION IN WHICH TO ALLOCATE REGION 

OR FOR MAIN SYSTEM PARTITION OF TASK. 
R.GSTS«CONTROL INFORMATION. 

RS.NDLsl IF REGION SHOULD NOT BE DELETED ON LAST 
DETACH. 

RS.ATTsI IF CREATED REGION SHOULD BE ATTACHED. 

RS.RED«1 IF READ ACCESS IS DESIRED ON ATTACH. 

RS.WRTrl IF WRITE ACCESS IS DESIRED ON ATTACH. 

RS.EXT«1 IF EXTEND ACCESS IS DESIRED ON ATTACH. 

RS.DEL«1 IF DELETE ACCESS IS DESIRt N ATTACH. 
R.CPRO>PROTECTION CODE FOR REGION CDEWR.DEWK iWR.DEWR]. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C»0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF *} IS RETURNED. 
C«1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RSl' IS RETURNED IF A PCB OR ATTACH- 
MENT DESCRIPTOR COULD NOT BE ALLOCATED. 

DIRECTIVE STATUS OF 'D.RS16' IS RETURNED IF THE DESIRED 
ACCcSS IS DENIED IN THE ATTACHMENT STAGE. 

DIRECTIVE STATUS OF 'D.RSS^' IS RETURNED IF THE SPECIFIED 
PARTIIICN IN WHICH THE REGION IS TO BF ALLOCATED 
DOES NOT EXIST. OR IF NO PARTITION NAME HAS BEEN 
SPfCIFirD AND RS.ATT«0. 

OUTPUT FIELDS IN THE '.EGION DEFINITION BLOCK ARE: 
R.G1D=ASS1C.KD REGION ID (RS.ATT*1). 
R.GStS'DlR^.UVE COMPLETION INFORMATION. 
R'..CMR>1 IF REGION WAS CREATED. 



*••• H 6 **** 



DRREG MACRO Ml 108 U-DEr-77 20:00 PAGF 5-2 



ORREG MACRO MHOS U-OEC-77 20:00 PAGE 3-2 



156 
137 
138 
139 
HO 
HI 
U2 
U3 
1AA 
U5 
U6 
U7 
U8 
1A9 
150 
151 
152 
153 
15A 
155 
156 
157 
158 
159 
160 
161 
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 
172 
173 
17A 
175 
176 
177 
178 
179 
180 
181 
182 
183 
184 
185 
186 
187 
188 
189 
190 
191 
192 



SDRCRR: 



.ENABL LSB 



.IF DF DtSYNMinSSnGE 



St: 



|A0 


#R.6PAR.R3 


M 


T.PCB(R5),R2 


fnw 


P.nAIN(R2).R2 


Tft 


(R3) 


■IQ 


5S 


(ALL 


tSRNAM 


•CS 


90$ 


C«P 


R2,P.nAIN(R2) 


BNE 


90S 


BIT 


#PS.SVS,P.STAT 


KQ 


90f 




R2,N0 


IVT 


-{R3) 


tit 


-(R3) 


mi 


101 


.m 




CMP 


(R3)*.(R3)* 



10l> 



.IFTF 
CALL 
.IFF 
■CS 
.IFT 
EC 



PNT TO NAME OF PAR IN WHICH TO ALLOCATE 
ASSUME ALLOCATING IN TASK'S PARTITION 
POINT TO MAIN PARTITION PCB 
PARTITION NAME SPECIFIED? 
IF EQ NO 

SEARCH FOR NAMED PARTITION'S PCB 
IF CS. PARTITION NOT IN SYSTEM 
IS IT A MAIN PARTITION? 
* IF NE NO 
(R^) ;IS IT A SYSTEM CONTROLLED PARTITION? 
IF EQ NO 

COPY POINTER TO PCB 
POINT TO REGION NAME (R.GNAM«2) 
REGION NAME SPECIFIED? (R.6NAM) 
IF EQ NO 



;POINT TO REGION NAME (R.GIDXR.GSIZ) 



tSRNAM 



901 



;DETERMINE IF NAME IS UNIQUE 



;ir CS REGION DOES NOT EXIST 



S5t ;IF CC. NAME IS NOT UNIQUE 

R3,-(SP) ;PUSH NONZERO WORD (P.ATTt2) 

-(SP) :(P.ATT) 

R.GPR0-R.GNAM(R3),-(SP) ;SET PROTECTION MASK (P. PRO) 

#210, (SP) .-INSURE OWNER AND SYSTEM DELETE ACCESS (P. PRO) 

-(SP) .'CLEAR HEADER POINTER (P.HDR) 

*PS.COM!PS.DEL!PS.PIC!PS.SYS.-(SP) ;StT STATUS WORD (P.STAT) 

H.CUIC(R4).-(SP) :SET OWNER UIC (P. OWN) 

-(SP) ;CLEAR BUSY FLAGS (P. BUSY) 

*(SP) .CLEAR SWAP SIZE (P.SWSZ) 

-(SP) .-CLEAR WAIT QUEUE POINTER (P. WAIT) 

R.GSIZ-R.GNAM(R3),-(SP) .STORE SIZE OF REGION (P. SIZE) 

•(SP) .-CLEAR RELOCATION BIAS (P. RED 

RO.-(SP) .-SET MAIN PCB POINTER (P.MAIN) 

'(SP) .-CLEAR SUBPARTITION LINK (P. INK) 

2(RS).-(SP) .-SET SECOND WORD OF PAR NAME (R.GNAM«2) (P.NAM«2) 

iR3).-(SP) .-SET FIRST WORD OF PAR NAME (R.GNAM) (P.NAM) 

sol .-IF NE NAME WAS SPECIFIED 

#RS.ATT.R.GS1S-R.GNAM(R3) ;IS REGION TO BE ATTACHED 



•••• I 6 **** 



DRRfG MACRO M1108 U-DEC-77 20:00 PAGE 3-5 



DRREG MACRO HHOB U-OEC-77 20:00 PAGE 3-3 



193 
19A 
195 
196 
197 
198 
199 
200 
201 
202 
203 
20A 
205 
206 
207 
208 
209 
210 
211 
212 
213 

^^^^ 

215 
216 
217 
218 
219 
220 
221 

^?^ 

2:.'3 

225 
226 
227 
229 
229 
250 
231 
2^2 
233 
23* 
235 
236 
237 
238 
259 
240 
241 
2'>2 
245 
244 
245 
246 
247 
c^48 
249 



30$: 

35S: 

36S: 



40S: 



50S: 
60t: 



SOS: 
90t: 



not: 



120$: 
125$: 



BEQ 

CLR 
CLR 
CLR 
NOV 

• IFTF 

BIT 
BEQ 
CALL 



.IFT 

TST 
BNE 

WV 

MOV 

CALL 

BCS 

MOV 

MOV 

MOV 

DEC 

BGT 

CMF 

BEQ 

MOV 

CMP 

BR 

MOV 

MOV 

MOV 

CALL 

BCS 

BIS 

BIT 

BEQ 

BIC 

.IFTF 

RETURN 
DRSTS 

.IFT 

BIC 

MOV 

MOV 

BR 

MOV 

MOV 

MOV 

MOV 

TST 



90$ 

2(SP) 

-(SP) 

-(SP) 

SP,K2 



:IF EQ NO, PARTITION NAME ERROR 

;ELSE CLEAR SECOND WORD OF NAME (P.NAMt2) 

.■ZERO I/O COUNT AND PRIORITY (P. IOC) 

:CLEAR LINK WORD (P.LNK) 

;COPV POINTER TO PCB ON STACK 



#RS.ATT.R.GSTS-R.GNAM(R3) .-ATTACH DESIRED? 



36$ 

ATT 



(SP) 

80$ 

R1.R5 

#P.LGTH,R1 

$ALOCB 

110$ 

#P.L6TH/2.R1 

R0.R4 

(SP)t.(RO)* 

R1 

40$ 

-(RO).-(RO) 

50$ 

R0.2(R0) 

-(RS).-{R3) 

60$ 

(R0).R5 

R4,A.PCB(R5) 

P.MA1N(R4).R5 

$FNDSP 

120$ 

«RS.CRR.R.GSTS 

«RS.NDL.R.GSTS 

80$ 

fPS.DEL.P.STAT 



D.RS94 



IF EQ NO 
ATTACH REGION 
REF LABEL 



WAS THE REGION CREATED? 

IF NE NO. DONE 

COPY POINTER TO ATTACHMENT DESCRIPTOR 

PICK UP PCB SIZE 

ALLOCATE A PCB 

IF CS ALLOCATION FAILURE 

PICK UP PCB SIZE IN WORDS 

COPY POINTER TO PCB 

FILL IN PCB 

DONE YET? 

IF GT NO 

WAS THE PCB ATTACHED? 

IF EQ YES 

SET UP LISTHEAD 

POINT TO REGION ID (R.GSIZ) (R.GID) 

PICK UP ADDRESS OF ATTACHMENT DESCRIPTOR 
POINT IT TO THE REAL PCB 
POINT TO MAIN PCB 

ATTEMPT TO ALLOCATE SPACE IN PARTITION 
:IF CS ALLOCATION FAILURE 
(R3) ; INDICATE REGION WAS CREATED 
(R3) ;IS NO DELETION DESIRED? 

.IF EQ NO 
(R4) .-CLEAR DELETE ON LAST DETACH FLAG 



.•PARTITION NAME ERROR 



tPS.SYS.P.STAT(SP) .-INSURE DETACH DOES NOT ATTEMPT TO DEALLOCATE 



SP.R4 

#$DEACB,(SP) 

<R3).R5 

R4,.-!6 

fP.H'iTH.Rl 

P.ATf(R4> 



;POiNT TO PCB ON STACK 

.-POINT TO NULL ROUTINE 

.-JOIN COMMON CODE 

.-ASSUME PCB MUST RE DEALLOCATED 

.-PICK UP ATT DESCRIPTOR ADDRESS (R.GID) 

.-POINT TO PCB TO DFAl LOCATE 

;PiCK UP PCB SIZE 

;WAS THE PCB ATTACHED? 



#••• J 6 **** 



DRREG MACRO M1108 U-OEC-77 20:00 PAGF 3-4 



DRREG MACRO Ml 108 lA-OEC-77 20:00 PAGE 3-4 



250 
251 
252 
253 
25A 
255 
256 
257 
258 
259 
260 
261 
262 
263 
26A 
265 
266 
267 
268 
269 
270 
271 
272 
273 
27A 
275 
276 
277 
278 
279 
280 
281 
282 
283 
284 
285 
286 
287 
288 
289 
290 
291 
292 
293 
294 
295 
296 
297 
298 
299 
300 
301 



126S: 



BEQ 


126S 


;IF EQ NO 


MOV 


«$DETRG,(SP) 


;SET TO DETACH REGION 


CALL 


B(SP)* 


.•CALl APPRORIATE ROUTINE 


DRSTS 


D.RS1 


.'ALLOCATION FAILURE 



.IFTF 



•*-$DRATR-ATTACH REGION 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO ATTACH THE SPECIFIED REGION 
TO THE CURRENT TASK. 

DPB FORMAT: 

WD. 00 — DIC(57.),DPB SI?E(2.) 

WD. 01 — ADDRESS OF REGION DEFINITION BLOCK 

INPUTS: 

R2>ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 
R3<ADDRESS OF THE REGION DEFINITION BLOCK. 
R4*ADDRESS OF THE HEADER OF THE CURRENT TASK. 
RS'ADDRESS OF THE TCB OF THE CURRENT TASK. 

INPUT FIELDS IN THE REGION DEFINITION BLOCK ARE: 

R.GNAMrNAME OF REGION TO ATTACH TO OR FOR TASK REGION. 
ft.GSTS«DESIRED ACCESS TO REGION. 

RS.RED'I IF READ ACCESS IS DESIRED. 
RS.WRT«1 IF WRITE ACCESS IS DESIRED. 
RS.EXT«1 IF EXTEND ACCESS IS DESIRED. 
RS.DEL'1 IF DELETE ACCESS IS DESIRED. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C«0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE OF *1 IS RETURNED. 
C«1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RSI' IS RETURNED IF AN ATTACHMENT 

DESCRIPTOR CANNOT BE ALLOCATED. 
DIRECTIVE STATUS OF 'D.RSU' IS RETURNED IF THE DESIRED 

ACCESS IS DENIED. 
DIRECTIVE STATUS OF •D.RS84' IS RETURNED IF THE SPECIFIED 
REGION NAME DOES NOT EXIST. 

OUTPUT FIELDS IN THE REGION DEFINITION BLOCK ARE: 
R.GID«ASSIGNED REGION ID. 
R.GSIZ>SIZE OF ATTACHED REGION. 



IDRATR::ADD «R.GNAM.R3 .POINT TO SPECIFIED REGION NAME 

TST (R3) .REGION NAME SPECIFIED? 

BEQ 90t ;IF EO NO. ILLEGAL 

CALL SSRNAM ;SCARCH FO'^ NAMED REGION 

BCS 90t :IF CS NAMED REGI0F4 DOES NOT EXIST 

ATT: BIT »PS.COM.P.STAT(R?) ;IS THE PARTITIW COMMON? 

BEQ 90S .IF EQ NO 



••*• K 4 *««• 



DRRFG MACRO Ml 108 14-DtC-77 20:00 PAGf 3-5 



DRREG MACRO Ml 108 U-DEC-77 20:00 PAGE 3-5 



130$: 
UOS: 



U6S: 



U7$: 



150S: 
15SS: 

160S: 



.IFT 

BIT 
BEQ 
CMP 
BR 

.IFTF 

BITS 

BEQ 

MOV 

BIT 

BNE 

NOV 

SUB 

CMP 

BEQ 

MOV 

BNE 

DRSTS 

MOV 

MOV 

.IFT 

CMP 
BLO 

.IFTF 

BIT 

BNE 

CALL 

CALL 

BCS 

NOV 

MOV 

RETURN 

DRSTS 

.DSABL 



#PS.SYS.P.STAT(R2) ;IS IT A SYSTEM CONTROLLED PARTITION? 



130$ 

R2.P.MAIN(R2) 

U0$ 



IF EQ NO 

IS IT THE MAIN SYSTEM CONTROLLED PARTITION? 



P.BUSY<R2),P.BUSY 
90$ 

R.GSTS-R.GNAM(R3) 
#17,R0 

T.AT:(R5),R1 

#A.TCBL,R1 

A.h:B(R1).R2 

155$ 

A.TCBL(R1),R1 

U6$ 

D.RSB6 

H.CUIC(R4),R1 



♦1(R2) :IS COMMON BLOCK NOT LOADED? 

IF EQ YES 

,R0 .-PICK UP STATUS WORD 

ATTACH DESIRED? 

IF NE YES 

POINT TO FIRST ATTACHMENT DESCRIPTOR 

POINT TO START OF DESCRIPTOR 

ATTACHED TO THIS PCB? 

IF EQ YES 

POINT TO NEXT ATTACHMENT DESCRIPTOR 

IF NE THERE IS ONE 

NO SUCH REGION ID 

PICK UP CURRENT TASK UIC 

COPY STATUS yORD 



R2.PC 
150$ 



:IS REGION BEING CREATED? 

;IF LO YES. SKIP PROTECTION CHECK 



*T3.PRV.T.ST3(R5) ;ISSUING TASK PRIVILEGED? 



150$ 

$CKACC 

$CRATT 

160$ 

P.SIZE{R2),-(R3) 

R1.-(R3) 

D.RS1 
LSB 



IF NE YES, SKIP ACCESS CHECK 
DETERMINE IF DESIRED ACCESS IS ALLOWED 
CREATE ATT DESCRIPTOR AND LINK IT IN 
IF CS ALLOCATION FAILURE 
.■RETURN SI7E OF REGION (R.GSI7) 
STORE DESCRIPTOR APDR AS REG ID (R.GID) 

ALLOCATION FAILURE 



•♦-$DRDTR-DETACH REGION 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO DETACH THE SPECIFIED REGION. 
UNMAPPING IF NECESSARY. 

DPB FORMAT: 

i WD. 00 -- DIC(59.),DPB SIZE(2.) 

; WD. 01 — ADDRESS OF REGION DEFINITION BLOCK 

; INPUTS: 

/ R?>ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 



•••• I A ««•« 



-i^ 



DRREG MACRO Ml 108 U-OEC-77 20:00 PAGf 3-6 



DRREG MACRO Ml 108 1A-DEC-77 20:00 PAGE 3-6 



R3=ADDRESS OF THE REGION DEFINITION BLOCK. 
' RA^ADORESS OF THE HEADER OF THE CURRENT TASK. 
R5=ADDRESS OF THE TCB OF THE CURRENT TASK. 

INPUT FIELDS IN THE REGION DEFINITION BLOCK ARE: 
R.GID'^REGION ID OF REGION TO DETACH. 
R.GSTS-CONTROL INFORMATION. 

RS.MDL»1 IF REGION SHOULD BE MARKED FOR DELETE ON 
THE LAST DETACH. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C«0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 
DIRECTIVE STATUS OF t1 IS RETURNED. 
C«1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RS16' IS RETURNED IF AN ATTEMPT IS MADE 

TO MARK THE REGION FOR DELETE WITHOUT DELETE ACCESS. 
DIRECTIVE STATUS OF *D.RS86' IS RETURNED IF AN INVALID REGION 
ID IS SPECIFIED OR IF AN ATTEMPT IS MADE TO DETACH 
REGION 0. 

OUTPUT FIELDS IN THE REGION DEFINITION BLOCK ARE: 

R.GSTS'INDK lON OF ANY CHANGES IN MAPPING CONTEXT. 
R'.wi«<-1 IF ANY WINDOWS WERE UNMAPPED. 



.ENABL LSB 
fDRDTR::TSTB T.I0C(R5) 
BNE 70% 



;ANY OUTSTANDING 1/0? 

;IF NE YES. REJECT FOR NOW 



.IF DF ASSTRPtCSSCKPITSSBUF 



BIT 
BNE 

.ENDC 



CALL 

MOV 

BIT 

BEQ 

MOV 

TST 

.IFT 

BIT 

BEQ 

BIT 

BEQ 

BHB 

BEQ 

BIS 

.irrt 



IH2.no. (H2) .-TASK HAVE OUTSTANDING TERMINAL 1/0? 

70% ;1F NE YES 



ISRAU ;SEARCH FOR AN3 VERIFY REGION ID 
A.PCB(R5).R0 :P01NT TO PCB 

#PS.COM,P.STAT(RO) .-DETACHING FROM COMMON REGION? 
60t :IF EO NO. DETACHING FROM TASK REGION 

H.WND(RA).RA ;POtNT TO NUMBER OF WINDOW BLOCKS 
(M)* ;POINT TO FIRST WINDOW BLOCK 



tPS.SYS.P.STAT(RO) .'SYSTEM CONTROLLED PARTITION? 

101 :1F EQ NO 

#RS.MDL.R.GSTS(R3) .-MARK FOR DFLETE DESIRED? 

lot :1F EO NO 

#AS.DEL.A.STAT(R5) ;DOtS TASK HAVE DELETE ACCESS? 

70% :IF EQ HO 

#PS.DEL.P.&TAT(R&) iMARK REGION fOR DELETE 



TM069 
TM069 
TM069 
TM069 
TM069 
TM069 
TM069 
TM069 
TM069 
TM069 



•••• m 4 *••• 



ORRIG MACRO M1108 U-DEC-77 POiOO PAGf 3-7 



DRREG MACRO Ml 108 U-DEC-77 20:00 PAGE 3-7 



^1 

^ i 
4 

4) 
4 ' 



} 



Si 



10$: CMP 
BNE 
CALL 
BIS 

20S: ADD 
TSTB 
BNE 



U.BATT(RA),R5 .-THIS WINDOW MAPPED TO REGION TO DETACH 
20S :IF NE NO 

tUNMAP ;UNMAP WINDOW 
«RS.UNM.R.GSTS(R3) .-INDICATE WINDOW WAS UNMAPPED 



«W.BLGH,R4 
A.MPCT(R5) 
10S 



POINT TO NEXT WINDOW BLOCK 

ANY MORE WINDOWS MAPPED TO THIS REGION? 

IF NE YES 



*»-$DETRG-DETACH REGION BY ATTA HMENT DESCRIPTOR ADDRESS 

THIS ROUTINE DETACHES A TASK FROM A REGION AND DEALLOCATES THE ATTACHMENT 
DESCRIPTOR. ON THE LAST DETACH OF A REGION IT IS CHECKED FOR DELETION. 
WHEN APPRORIATE. SNXTSK IS CALLED. 

INPUTS: 

R5«ADDRESS OF ATTACHMENT DESCRIPTOR 
OUTPUTS: 

R0,R1,R2.R3 ARE MODIFIED. 



.•POINT TO PCB OF REGION 

.-POINT TO ATTACHMENT DESCR LISTHEAD 

.•CLEAR SEARCH KEY 

.•SAVE TCB ADDRESS 

.•MARK ATTACHMENT DESCRIPTOR FOR RtMOVAL 

.•REMOVE DESCRIPTOR FROM PCB'S QUEUE 



;1S ANYONE ELSE ATTACHED? (P. ATT) 

.•IF NE YES 
STAT-P.ATT(RO) ; IS PARTITION SYSTEM CONTROLLED? ' 

.•IF EQ NO 
0) .IS THIS A NAMED REGION? 

;IF EQ NO. FORCE DELETION 
i-P.ATKRO) ;IS REGION MARKED FOR DELETE? 

:IF EQ NO 

.•POINT TO START OF PCB 

.•POINT TO MAIN PARTITION PCB 

.DOES THIS PARTITION LINK TO ONE TO DELETE? 

.IF EQ YES 

.•POINT TO NEXT SU9PARTITI0N 

.•IF NE THERE US ONE 

;SKIP UNLINK Of PCB (THIS INDICATES SDRCRR CALL) 
UB(R1) ;UNLINK DETACHED PARTITION 

tPICK UP SIZE FOR DELETE 

.•DEALLOCATE PCB 



SDETRG: 


:MOV 


A.PCa(R5).R0 




ADD 


#P.ATT,R0 




CLR 


R1 




MOV 


A.TCB(R5).-(S 




CLR 


A.TCB(R5) 




CALL 


$QRMVT 




.IFT 






TST 


(RO) 




BNE 


50$ 




BIT 


#PS.SYS.P.STA 




BEQ 


50$ 




TST 


P.NAM-P.ATUR 




BEQ 


25$ 




BIT 


#PS.DEL.P.f ^ 




BEQ 


55$ 


25$: 


SUB 


#P.ATT.RO 




MOV 


P.MAIN(R0).R1 


30$: 


CMP 


P.SU8(Rn.R0 




BEQ 


40$ 




MOV 


P.SUB(R1).R1 




BNE 


30$ 




BR 


45$ 


40$: 


MOV 


P.SU8(R0),P.C 


45$: 


MOV 


#P.LGTH.Ri 




CAU 


$DEACB 




.ENDC 






.IF DF 


D$$ISK 



•••# N 6 **** 



DRREG MACRO Ml 108 U-DEC-77 20:00 PAGE 3-8 



^2 

47 



A9$: 



50$: 



50$: 



55$: 



60$: 
70$: 



MOV 

MOV 

MOV 

CALL 

BA 

BIT 

BEQ 

.IFF 



.ENDC 



MOV 
ADD 
CLR 
CLR 

cal;. 

MOV 
MOV 
CALlR 

DRsrs 

DRSTS 
.DSABL 

.ENOC 



000001 



.END 



A.PCB(R5),R0 

RO.RI 

P.MAIN(R1).R5 

$RLPR1 

55$ 

#PS.CO«!PS.SYS,P 

«9$ 



POINT TO DETACHED PCB 
COPY PCB POINTER 
POINT TO MAIii PARTITION PCB 
RELEASE THE PARTITION 

STAT-P.ATT(RO) ."FIXED TASK PARTITION? 
IF EQ NO, RELEASE FIXED TASK PARTITION 



:REF LABEL 



(SP)t.RO : RESTORE TCB ADDRESS 

fT.ATT.RO .-POINT TO ATTACHMENT DESCRIPTOR LISTHEAD 

R1 .-CLEAR SEARCH KEY 

A.PCB(R5) .-MARK ATTACHMENT DESCRIPTOR FOR REMOVAL 

$QRMVT .-REMOVE DESCRIPTOR FrOM TCB'S LIST 

R5.R0 ;COPY DESCRIPTOR ADr^^ESS 

#A.L6TH.R1 .-SET SIZE TO OE .Ll*-:ATE 

$DEAC6 .-DEALLOCATE AT , .HMENT DESCRIPTOR 

D.RS86 ; INVALID REGION ID 

D.RS16 ;ATTEMPT TO MARK FOR DELETE WITHOUT ACCESS 

LSB 



••#• § f •••* 



DRREG MACRO Ml 108 U-OEC-77 20:00 PAGE 3-9 
SYMBOL TABLE 



IC$$TPS= 00007A 
M$SCRB= 0001 2A 
RS$F11= 000001 
R»$JP0= 000000 
R»>JP1= 000001 



R«JS1= 000001 
R$$K11= 000001 
RSSP11= 000001 
R$$X11= 000001 
R$S11M= 000000 



CStORE= 000400 
H*»RTZ= 00007A 
K»CNT= 1775A6 
K»$CSR= 1775A6 
KSSIEN= 000115 
K»»LOC= 000001 

. ABS. 000000 000 
000000 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 1125 WORDS ( 5 PAGES) 
DYNAMIC MEMORY: 1574A WOKDS ( 60 PAGES) 
ELAPSED TIME: 00:00:U 
CA1.20]DRREG.SYO:CA1.30]DRREG/-SP=C1.1]EXEMC/ML.CA1.10]RSXMC.C11.10]ORREG 



RSS11S= 000000 
SSSECC= 000000 
SI$YSZ= 001000 
T$$A11= 000001 
T$IC11= 000001 



T«J16= 000001 

T$$KMG= 000000 

T$$M11= 000001 

VS$CTR= 000400 

$DETRG= 000001 6 



•*t* c 7 ••«• 




•••• p 7 **«t 



DRREQ MACRO Ml 108 U-DEC-77 ?0:00 PAGE 2 



1 
11 

II 

U 

15 

16 

17 

18 

19 

20 

21 

22 

23 

24 

25 

26 

Z7 

28 000000 

29 



1 



40 
41 

8 

a 

45 
46 
47 
48 



•TITLE ORREQ 
. I DENT /03/ 



COPYRIGHT (C) 1974. 1976 

DIGITAL EQUIPMENT CORPORATION. MAYNARD. MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 03 

D. N. CUTLER 13-SEP-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
T. J. MILLER 

MODIFIED BY: 

REQUEST TASK DIRECTIVE 

MACRO LIBRARY CALLS 



.MCALL TCBDFS 
TCBDFt 



.•DEFINE TASK CONTROL BLOCK OFFSETS 



;♦ 



**-SDRREQ-REQUEST TASK 



THIS DIRECTIVE INSTRUCTS THf SYSTEM TO REQUEST THE EXECUTION 
OF A SPECIFIED TASK. 

DPB FORMAT: 

WD. 00 — DIC(11.).DPB SIZE(7.). 

I WP. 01 — FIRST HALF OF TASK NAME. 

I WO. 02 -- SECOND HALF OF TASK NAME. 

I WD. 03 — PARTITION NAME-NOT SUPPORTED BUT MUST BE PRESENT. 

I WO. 04 — PARTITION NAME-NOT SUPPORTED BUT BUST BE PRESENT. 

I WD. 05 — REQUEST PRIORITY-NOT SUPPORTED BUT MUST BE PRESENT. 

I WO. 06 — REQUEST UK. 



INPUTS: 



RO'AODRESS OF THE TCB OF THE TASK TO BE REQUESTED. 

R1«ADDRESS OF THE TASK STATUS WORD OF THE TASK TO BE REQUESTED. 

R2«ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3>ADDRESS OF THE PARTITION NAME IN THE DPB. 

R4«ADDRESS OF THE HEADER OF THE CURRENT TASK. 

RS'ADDRESS OF THE TCB OF THE CURRENT TASK. 



OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 
C«0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 



KBbrn MArbn Mtma 1i.-l\cr-T7 3A.An DAAC 3.1 



DRREQ MACRO MHOS U-OEC-77 20:00 PAGE 2-1 



58 

59 

60 

61 

62 

63 

6A 

65 

66 000000 

67 

68 

69 

70 

71 

72 

73 

7A 

75 

76 OOOOOA 

77 000010 

78 OOOOU 

79 000016 
80 

81 

82 

83 

84 

85 

86 

87 

88 

89 

90 000020 

91 

92 

93 

9* 

95 



DIRECTIVE STATUS OF *^ IS RETURNED. 
Csl IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'O.RSI' IS RETURNED IF PARTITION 

CONTROL BLOCK CANNOT BE ALLOCATED. 
DIRECTIVE STATUS OF •D.RS7' IS RETURNED IF SPECIFIED. 

TASK IS ALREADY ACTIVE. 



016301 000006 



SDRREQ::nOV 



6(R3).R1 



016502 000026 
103A01 



.IF DF MSSnUP 
CALL SUISET 
.ENDC 



MOV T.UCB(R5),R2 

CALL STSKRP 

BCS 10$ 
RETURN 



.IF DF DSSVNMinSSMGE 



lot: 
20S: 

10S: 



000001 



BEQ 

DRSTS 

DRSTS 

.IFF 

ORSTS 

.ENDC 

.END 



20$ 

D.RS1 

D.RS7 



D.RS7 



;GET REQUEST UK 



; ESTABLISH DEFAULT AND CURRENT UK'S 



.-GET ADDRESS OF REQUESTER TI UCB 
.■REQUEST TASK EXECUTION 
;1F CS TASK ALREADY ACTIVE 
.•RETURN DIRECTIVE STATUS OF +1 



IF EQ TASK ALREADY ACTIVE 
SET DIRECTIVE STATUS 
SET DHECTIVE STATUS 



;SET DIRECTIVE STATUS 



•••• f 7 **t« 



i\kkCB MArttn min* i/..n' r.77 ^n-nn PAnr 9-9 



DRREQ MACRO Ml 108 
SYMBOL TABLE 



U-0'.C-77 20:00 PAGE 2-2 



CS$ORE= 

0.RS7 = 
HtSRTZ- 
K»»CNT= 
KUCSRs 
KttlEN^ 
KSSLDCs 
IC$»TPS= 
MI$CRB> 
Rt»F11s 
Rt«J(>0> 
RSSJPIs 
RUJS1> 
RUKIU 
R»»P11« 
RSSX11- 
RSS1ins 



OOOAOO 
«****• GX 

000074 
1775A6 
1775A6 
000115 
000001 
00007A 
0001 2A 
000001 
000000 
000001 
000001 
000001 
000001 
000001 
000000 



R»$11S= 
SStECC- 

s$»vsz= 

TS.BLK= 
TS.CKP= 
TS.CKRs 
TS.EXE= 
TS.«SG= 
TS.NRP= 
TS.OUTs 
TS.RON* 
TS.RUN* 
TIUIIs 
T»»C11« 
TS$Jl6s 
TStKMG: 
TSWIls 



000000 
000000 
001000 
170700 
000200 
000100 
100000 
020000 
010000 
000400 
040000 
004000 
000001 
000001 
000001 
000000 
000001 



T.ACTL 


000052 


T.ASTL 


000016 


T.ATT 


000054 


T.CPCB 


000004 


T.DPRI 


000040 


T.EFL6 


000022 


T.IOC 


000003 


T.LBN 


000041 


T.LDV 


000044 


T.LNK 


000000 


T.HXSZ 


000050 


T.NAM 


000006 


T.OFF 


000060 


T.PCB 


000046 


T.PRl 


00000? 


T.RCVL 


0000 ' 


T.RRFL 


00006A 



T.SRCT 

T.STAT 

T.ST? 

T.ST5 

T.TCBL 

T.UCB 

T2.AB0= 

T2.AST= 

T2.BFX= 

T2.CAF= 

T2.CHICS 

T2.CICD= 

T2.DST* 

T2.FXD= 

T2.HLT= 

T2.SPN= 

T2.STP= 



. ABS. 000070 000 

000022 001 

ERRORS DETECTED: 

VIRTUAL KMORV USED: 2119 WORDS ( 9 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:10 
C41.20]DRREQ.SY0:C41,30]DRREQ/-SP>C1.nEXEMC/ML,C41,103RSXMC.C11,10]DRREQ 





000063 
000032 
000034 
000036 
000030 
000026 
000100 
100000 
004000 
000400 
020000 
010000 
040000 
002000 
000200 
000004 
000020 



T2.TI0= 

T2.WFR= 

T3.ACP= 

T3.CAL= 

T3.CLI= 

T3.MCR= 

Ti.NET= 

T3.NSD= 

T3.PMD= 

T3,PRV= 

T3.REM= 

T3.R0V= 

T3.RST= 

T3.SLV= 

V$$CTR= 

SDRREQ 

$TSKRP= 



001000 

000001 

100000 

000100 

001000 

004000 

000020 

000200 

040000 

010000 

020000 

000040 

000400 

002000 

000400 

OOOOOORG 

•••♦•• GX 



•••• 6 7 **** 



N I i 




**t« H 7 •••• 



MRF^ MACRO MIlOa U-DEC-77 ?0:00 PAGF2 



DRRES MACRO mi 08 U-DEC-77 20:00 PAGE 2 



1 

2 

3 

4 

5 

6 

7 

8 

9 
10 
11 
12 
13 
1A 
15 
16 
17 
18 
19 
20 
21 
22 
23 
2A 

25 000000 

26 000000 

27 000000 

28 000000 
29 

30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 



.TITLE DRRES 
.lOENT /04/ 



COPYRIGHT (C) 1974. 1976 

DIGITAL EQUIPMENT CORPORATION, NAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND NAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 04 

D. N. CUTLER 31-AUG-73 

PREVIOUSLY MODIFIED BY: 

T. J. MILLER 

MODIFIED BY: 

MACRO LIBRARY CALLS 

.MCALL HDRDFS.PKTDFS.PCBDFS.TCBDFS 

HDRDFS .-DEFINE TASK HEADER OFFSETS 

PKTDFS .DEFINE I/O PACKET OFFSETS 

PCBDFS ;DEFINE PARTITION CONTROL BLOCK OFFSETS 

TCBDFt :OEFINE TASK CONTROL BLOCK OFFSETS 

♦♦-fDRRES-RESUME TASK EXECUTION 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RESUME THE EXECUTION OF A TASK THAT 
HAS ISSUED A SUSPEND DIRECTIVE. 

DPB FORMAT: 

WO. 00 — DIC(47.).DPfl S1ZE(3.). 
WD. 01 — FIRST HALF OF TASK NAME. 
WD. 02 — SECOND HALF OF TASK NAME. 

INPUTS: 

RO«ADDRESS OF THE ^C% OF THE TASK TO BE RESUMED. 

R1«Ar»0RESS OF THE TASK STATUS WORD OF THE TASK TO BE RESUMED. 

R2>ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3-ADDRESS OF THE LAST WORD IN THE DPB*2. 

R4>ADDRESS OF THE HEADER OF THE CURRENT TASK. 

R5«ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C«0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF ♦! IS RETURNED. 
C«l IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF '0.RS7 IS RETURNED IF THE SPECIFIED 
TASK IS NOT ACTIVE. 



t**« I 7 •••• 



hBDr<: MArftn M110M U-bFC-77 P0:00 PAGF 2-1 



ORRES MACRO Ml 108 U-OEC-77 20:00 PAGE 2-1 



58 

59 

60 

61 

62 

63 000000 

6<i 000002 

65 OOOOOA 

66 000010 

67 000012 

68 OOOOU 

69 000016 

70 000020 

71 000022 

72 00002A 

73 000026 

74 000030 
00003* 
000036 



005721 

100AU 

012702 OOOOOA 

030211 

001005 

005711 

100007 

006302 

030211 

OOUOA 

0A0211 



75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
91 
92 
93 
94 
95 
96 
97 
98 
99 

100 000040 

101 000044 

102 000050 
103 

104 
105 
106 
107 

las 

109 

no 
111 

115 
114 



• V 






.ENABL 


SDRRES: 


:TST 




BMI 




NOV 




BIT 




BNE 




TST 




BPL 




ASL 




BIT 




BEQ 


10S: 


BIC 




CALLR 


201: 


DRSTS 


30$: 


DRSTS 



DIRECTIVE STATUS OF '0.RS8' IS RETURNED IF THE SPECIFIED 
TASK IS NOT SUSPENDED. 



LSB 

(RD* 

20S 

#T2.SPN.R2 

R2.(R1) 

lOi 

(R1) 

30S 

R2 

R2,(R1) 

30$ 

R2,(R1) 

ISETCR 

D.ftS7 

D.RS8 



••-fORSPN-SUSPENO EXECUTION 



TASK ACTIVE? 

IF MI NO 

GET SUSPEND BIT 

TASK CURRENTLY SUSPENDED? 

IF NE VES 

AST IN PROGRESS? 

IF PL NO 

SET PRE AST SUSPEND BIT 

VAS TASK SUSPENDED? 

IF PC NO 

CLEAR SUSPEND STATE 

SET A CONDITIONAL SCHEDULE REQUEST 

SET DIRECTIVE STATUS 

SET DIRECTIVE STATUS 



THIS DIRECTIVE INSTRUCTS THE SYSTEM TO SUSPEND THE EXECUTION OF THE ISSUING 
TASK. 

DP6 FORMAT: 

WO. 00 — DIC(45.).DPB SIZEd.). 

INPUTS: 

R2«ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3<cADDRESS OF THE LAST WORD IN THE DPB«2. 

R4'ADDRESS OF THE HEADER OF THE CURHCNT TASK. 

R5>ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C«0 WITH A DIRECTIVE STATUS OF •D.RS22'. 



0')2712 000004 



tDRSPN::BIS 
CALL 
DRSTS 



#T2.SPN.(R2) 

ISETRT 

D.RS22 



SUSPEND CURRENT TASK 

FORCE A RFDISPATCHING OF PROCESSOR 

SET DIRECTIVE STATUS 



••-IDRATP-ALTER TASK PRIORITY 



THIS DIRECTIVE INSTRUCTS THE SYSTEM TO CHANGE THE TASK PRIORITY 
OF THE SPECIFIED TASK. 



DPB FORMAT: 

WD. 
WD. 
WD. 02 



DK(9.),DPfl SJZE(4.) 
FIRST HALF OF task NAME. 
SECOND HALF OF TASK NAME. 



•t** J 7 tt** 



MM« MAfRO MnOR U-DEC-77 ?OtOO PAGF2-2 



DRRES MACRO Ml 108 U-DEC-77 20:00 PAGE 2-2 






WD. 03 — NEW PRIORITY. 



INPUTS: 

RO^ADDRESS OF THE TCB CF THE TASK TO BE ALTERED. 

RI^ADDRESS OF THE TASK UATUS WORD OF THE TASK TO BE ALTERED. 

R2-ADDRESS OF THE TASK VTATUS WORD OF THE CURRENT TASK. 

R3=ADDRESS OF THE LAST blRD IN THE DP8. 

R4=ADDRESS OF THE HEADER OF THE CURRENT TASK. 

RS=ADDRESS OF THE TCB OF li!E CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

; DIRECTIVE STATUS OF ♦! IS RETURNED. 

; C-1 IF DIRECTIVE IS REJECTED. 

; DIRECTIVE STATUS OF 'D.RSZ' IS RETURNED IF THE 
; TASK IS NOT ACTIVE. 

; DIRECTIVE STATUS OF 'D.RSPS' IS RETURNED IF THE 

NEW PRIORITY SPECIFIED IS INVALID. 



SDRATP:i 



.IF DF ASSPRI 



.IF DF MSSMUP 



40S: 



;o$: 



BIT 


#T3.PRV,T.ST3(R 


BEQ 


180S 


.ENDC 




MOV 


R0.R5 
(R1) 


TST 


BMI 


20% 


MOV 


(R3),R3 


BNE 


AGS 


BISB 


T.DPRI(R5)..?3 


CMP 


R3.#?50. 


BHI 


176$ 


MOVB 


R3.T.PRI(R5) 


TSTB 


,W"" 


BEO 


CLR 


-(SP) 


MOV 


T.PCB(R5).R« 


MOV 


P.HDR(R4).R4 


CMP 


fSP).H.NLUN(R<i) 


BHIS 


90$ 


MOV 


(SP).RI 


CALL 


IMPLNf 


BCS 


SOS 



;REF LABEL 



.IF EQ NO 



SAVE TCB ADDR Of TASK TO BE ALTERED 

TASK ACTIVE? 

IF MI NO 

GET NEW PRIORITY AND TEST IT 

IF NE ONE WAS SPECIFIED 

USE DEFAULT PRIORITY 

NEW PRIORITY .GT. ?50? 

IF HI YES 

SFT NEW PRIORITY 

ANY I/O ACTIVE? 

IF EQ NO 

PUSH INITIAL LUN NUMBEFl - 1 

GET PCB ADDR 

GET TA3K HEADER OF TASK TO BE ALTERED 

PAST LAST LUN? 

IF HIS YES 

GET LUN -1 

MAI' LUN TO UCB ADDRESS 

IF CS LUN IS NOT ASSIGNED 



•••• K 



•«•• 



DRRES MACRO MIIOH U-DEC-77 ?0:00 PAGE ?-3 



DRRES MACRO M1108 H-DEC-77 20:00 PAGE 2-3 



110$: 



120$: 



.IF OF 

nov 

.IFTF 

nov 

CALL 

.in 

MOV 

TST 

BPL 

BITB 

BNE 

nov 

ADD 

CALL 

.ENDC 



.ENDC 



A$$CPS 
RO.-(SP) 



U.SCB(RO},RA 
130$ 



;SAVE UCB ADDRF3S 



;GET PTR TO SCB FOR THIS UCB 
.•REORDER I/O QUEUE 



80$: 


INC 


(SP) 




BR 


50$ 


90$: 


TST 


(SP)* 


100$: 


nov 


RS.RO 




CALL 


$ACTRn 




BCS 


110$ 




CALL 


$ACTT)( 





CALLR 


$DRDSE 


130$: 


nov 


#-2.-(SP) 




ADD 


SP,(SP) 




CLR 


-<SP) 


U0$: 


nov 


M.M 




nov 


R5,R1 




CALL 


$QRnVT 




BCS 


150$ 



(SP)*.RO .-RETRIEVE UCB ADDRESS 

U.CWKRO) .-DEVICE nOUNTABLE? 

80$ ;IF PL NO 

*US.nNT!US.FOR,U.STS(RO) .-nOUNTED AND NOT FOREIGN? 

80$ .-IF NE NO 

U.ACP(RO),RA .-PICK UP TCB OF ACP 

#T.RCVL.R4 .-POINT TO RECEIVE QUEUE LISTHEAD 

130$ .-REORDER ACP QUEUE 



UPDATE LUN NUMBER 

CONTINUE THROUGH LUN LOOP 

POP LUN NUnBER FROn STACK 

GET TCB ADDR OF TASK TO BE ALTERED 

REMOVE TCB FROM ATL 

IF CS TCB NOT YET IN ATL 

RE-INSERT TCB IN ATL 

REF LABEL 



GET PCB ADDR 

GET MAIN PCB ADDR 

GET LISTHEAD FOR PARTITION WAIT QUEUE 

POINT TO TASK TCB 

TRY TO REMOVE TCB FROM QUEUE 

IF CS TCB NOT IN WAIT QUEUE 

RE-INSERT TCB BY NEW PRIORITY 

GET PCB ADDR 

RE-SCHEDULE PARTITION 



DECLARE SIGNIFICANT EVENT 

CONSTRUCT TEMPORARY LISTHEAD ON STACK 



.IF DF D$$ISK 



MOV 


T.PCB(R5),R4 


MOV 


P.MAIN(RA).RO 


ADD 


fP.WAIT.RO 


MOV 


R5.R1 


CALL 


$QRMVT 


BCS 


120$ 


CALL 


$QINSP 


MOV 


R4.R0 


CALL 


$NXTSK 



GET I/O PACKET LISTHEAD ADDR 
GET TCB ADDR OF TASK TO BE ALTERED 
REMOVE I/O PACKET BY TCB ADDR 
IF CS NO I/O PACKET FOUND 



*•*# I 7 **** 



bQ»^ MArnn M11QR U-DFC-77 20:00 PAGt 2-4 



DRRES MACRO Ml 108 U-DEC-77 20:00 PAGE 2-4 



4| 

43 





MOVB 


T.PRI(R5),I 




MOV 


SP.RO 




CALL 


$QINSF 




BR 


U0$ 


150»: 


MOV 


SP.RO 




CALL 


$QRMVF 




BCS 


160$ 




MOV 


M.M 




CALL 


$QINSP 




BR 


150$ 


160»: 


CMP 

RETURN 


(SP)+.(SP)* 


170$: 


DRSTS 


0.RS95 




.IF DF 


M$$MUP 


180$: 


DRSTS 
.ENDC 


D.RS16 



PRKRI) .-SET NEW PRIORITY 

SET TEMPORARY LISTHEAD ADDR 
INSERT I/O PACKET IN TEMPORARY LIST 
CONTINUE THROUGH PACKET REMOVAL LOOP 
SET TEMPORARY LISTHEAD ADDR 
; REMOVE FIRST I/O PACKET FROM LIST 
IF CS NO I/O PACKET FOUND 
;GET I/O PACKET LISTHEAD ADDR 
;RE-INSERT I/O PACKET BY NEW PRIORITY 
CONTINUE THROUGH PACKET INSERTION LOOP 
CLEAN TEMPORARY LISTHEAD OFF STACK 

SET DIRECTIVE STATUS 



;PRIVILEGE VIOLATION 



' 



000001 



.ENDC 

.DSABL 
.END 



LSB 



••*• M 7 •••• 



ORRtS MACRO M1108 U-DEC-77 20:00 PAGf 2-5 



DRRES 


MACRO Ml 108 1A-0EC-77 20:00 PAGE 2-5 




SYMBOL 


TABLE 








AS.DEL= 


000010 


H.IPS 


000014 


PS.COM= 


AS.EXT= 


OOOOOA 


H.ISP 


000020 


PS.DEL= 


AS.RED= 


000001 


H.LUN 


000076 


PS.DRV= 


AS.WRT= 


000002 


H.NLUN 


000074 


PS.FXO= 


A. AST 


000006 


H.ttfV. 


000061 


PS.L10= 


A.BYT 


OOOOOA 


H.ODVA 


000022 


PS.NSF= 


A.CBL 


000002 


H.OOVL 


000024 


PS.OUT* 


A.DQSR 


177776 


H.OVLV 


000054 


PS.PER= 


A. IOC 


000003 


H.PFVA 


000032 


PS.PIC= 


A.KSR5 


17777A 


M.RCVA 


000036 


ps.srss 


A.LGTH= 


OOOOU 


H.RRVA 


000062 


P.BLKS 


A.MPCT 


000011 


H.SPRl 


000060 


P. BUSY 


A.NPR 


000010 


H.TKVA 


000026 


P. IOC 


A. PCS 


000012 


H.TICVL 


000030 


P.LNK 


A.PCBL 


000000 


H.VEXT 


000056 


P. MAIN 


A.PRl 


000002 


H.WND 


000044 


P.NAM 


A.PRM 


000012 


LAST 


000022 


P. OWN 


A.STAT 


000010 


I.ATTLs 


000044 


P.PRI 


A.TCB 


00000* 


I.EFN 


000003 


P.REL 


A.TCBL 


000006 


I.FCN 


000012 


P. SIZE 


CStOREe 


000400 


I.IOSB 


000014 


P.STAT 


O.RS22= 


••*♦•* GX 


I.LGTH- 


000044 


P. SUB 


0.RS7 X 


*•••** GX 


I.LNK 


000000 


P.SWSZ 


D.RS8 >■ 


*♦••** GX 


1.LN2 


000006 


P.TCB 


H»»RTZ= 


000074 


l.PRI 


000002 


P. WAIT 


H.CSP 


000000 


l.PRM 


000024 


RS»F11- 


H.CUIC 


000010 


I.TCB 


000004 


RStJPO« 


H.DSW 


000046 


l.UCB 


000010 


RSSJPU 


H.DUIC 


000012 


KSSCNTs 


177546 


RSSJSIs 


H.EFLH 


000004 


KStCSR» 


177546 


RtSKlls 


H.EFSV 


000040 


KtSIEN« 


000115 


RSSPIIs 


H.FCS 


000050 


KISLDC> 


000001 


RttXll^ 


H.FORT 


000052 


KtSTPS> 


000074 


RSS11M> 


H.FPSA 


000042 


MttCRB^ 


000124 


RtSIISa 


H.FPVA 


000034 


PS.APR= 


000007 


S$SECC« 


H.GARD 


000072 


PS.CHK* 


01 0000 
040000 


SttYSZ> 


H.MDLN 


000002 


PS.CKP«= 


TS.BLK" 


H.IPC 


000016 


PS.CICR= 


020000 


TS.CKPs 


. A8S. 


1 77776 000 
000052 CM 








ERRORS 


DETECTED: 









000200 

000010 

000020 

004000 

001000 

000400 

100000 

002000 

000100 

000040 

000016 

00OC24 

000003 

000000 

000012 

000004 

000026 

000002 

OOOOU 

000016 

000030 

000010 

000022 

000026 

000020 

000001 

000000 

000001 

000001 

000001 

000001 

000001 

000000 

000000 

000000 

001000 

170700 

000200 



TS.CKR= 

TS.EXE= 

TS.MSG= 

TS.NRP= 

TS.OUTs 

TS.RDN' 

TS.RUN« 

TSSA11- 

T$»C11= 

TS»J16' 

T$$ICMG» 

T$$M11= 

T.ACTL 

T.ASTL 

T.ATT 

T.CPCB 

T.OPRI 

T.EFLG 

T.IOC 

T.LBN 

T.LDV 

T.LNK 

T.MXSZ 

T.NAM 

T.OFF 

T.PCP 

T.PRI 

T.RCVL 

T.RRFL 

T.SRCT 

T.STAT 

T.ST2 

T.ST3 

T.TCflL 

T.UCB 

T2.AB0= 

T2.AST= 

T2.BFX=: 



VIRTUAL MEMORY USED: 3789 WORDS ( 15 PAGES) 
DYNAMIC MEMORY; 1574* WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:15 

r41,20]DRRFS.SVO:r41.30]DRRES/-SP«C1.UEXEMC/ML.C41.10]RSXMC,[n,10]DRRES 



000100 


T2.CAF= 


000400 


100000 


T2.CHK= 


020000 


9?S5oo 


T2.CKD= 


010000 


010000 


T2.DST= 


040000 


000400 


T2.FXD= 


002000 


040000 


T2.HLT= 


000200 


004000 


T2.SPN= 


000004 


000001 


T2.STP= 


000020 


000001 


T2.TI0= 


001000 


000001 


T2.WFR= 


000001 


000000 


T3.ACP= 


100000 


000001 


T3.CAL= 


000100 


000052 


T3.CLI= 


001000 


000016 


T3.MCR= 


004000 


000054 


T3.NET= 


000020 


000004 


T3.NS0* 


000200 


000040 


T3.PMD* 


040000 


000022 


T3.PRVS 


010000 


000003 


r3.REM« 020000 


000041 


T3.R0V= 


000040 


000044 


T3.RST= 


000400 


000000 


T3.SLV= 


002000 


000050 


V$$CTR= 


000400 


000006 


W.BATT 


000006 


000060 


W.BFPD 


000014 


000046 


W.BHVR 


000004 


000002 


W.BLGH 


000020 


000012 


W.BLPD 


000016 


00006'. 


W.BLVR 


000002 


000063 


W.BNPD 


000015 


000032 


W.aOFF 


000012 


000034 


W.BPCB 


000000 


000036 


W.BSI? 


000010 


000030 


SDRRES 


OOOOOORG 


000026 


»DRSPN 


000040RG 


000100 


$SETCR= 


••**♦« GX 


100000 


$S£TRT= 


•••».. GX 


004000 







*••* N 7 •«•• 




••*• I I t««* 



DRSEO MACRO Ml 108 U-OEC-77 20:01 PAGE 2 



28 000000 

29 000000 



.TITLE DRSED 
. I DENT /05/ 



COPYRIGHT (C) 197A, 1976 

DIGITAL EOUIPMENT CORPORATION. MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 05 

D. N. CUTLER 2-SEP-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
T. J. MILLER 

MODIFIED BY: 

SIGNIFICANT EVENT AND EVENT FLAG DIRECTIVES 

MACRO LIBRARY CALLS 



.MCALL HDRDFt.TCBDFS 

HDRDFS 

TCBDFI 



; DEFINE TASK HEADER OFFSETS 
.•DEFINE TASK CONTROL BLOCK OFFSETS 



;♦ 



•♦-SDRCEF-CLEAR EVENT FLAG 



THIS DIRECTIVE INSTRUCTS THE SYSTEM TO CLEAR AN EVENT FLAG AND 
REPORT ITS POLARITY BEFORE CLEARING. 

DP6 FORMAT: 

WD. 00 — DIC(31.),DPB S1ZE(2.). 

WD. 01 — EVENT FLAG NUMBFR OF FLAG TO BE CLEARED. 

INPUTS: 



{ RO*EVENT FLAG MASK WORD. 

I R1<EVENT FLAG MASK ADDRESS. 

} R2«ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

} R3«ADDRESS 0'' THE LAST WORD IN THE DPB*2. 

I R«=ADDRFSS OF THE HEADER OF THE CURREK'1 TASK. 

t R5=ADDRFSS Or THC TCB OF THE CURRENT TASK. 

• 

; OUTPUTS: (DIRECTIVE iMIUS AND PS RETURNED TO TASK) 

1 C«0 WITH A DIRECTIVE STATUS OF 'O.RSOO' IF THE FLAG WAS 
i CLEAR OR •D.RS22' IF THE FLAG WAS SET. 



.ENABL LSB 



•••• C I **** 



DRSEO MACRO mi08 1A-0EC-77 20:01 PAGE 2-1 



58 000000 030011 

59 000002 OOU25 

60 000004 0A0011 

61 000006 



$DRCEF::BIT 
BEQ 
SIC 

10S: DRSTS 



RO.(RI) 
20i 

RO.(RI) 
D.RS22 



;TEST FLAG 

:!f EQ FLAG IS CLEAR 

: CLEAR FLAG 

.-SET DIRECTIVE STATUS 



**-$DRDSE-DECLARE SIGNIFICANT EVENT 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO DECLARE A SIGNIFICANT EVENT. 

DPS FURMAT: 

WD. 00 — DIC(35.).DPB SIZEd.). 

INPUTS: 

R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 
R3sADDRESS OF THE LAST WORD IN THE DP8t2. 
R4-ADDRESS OF THE HEADER OF THE CURRENT TASK. 
R5-ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) " 

C«0 WITH A DIRECTIVE STATUS Cr ♦!. 

NOTE: THIS DIRECTIVE IS ALSO CALLED A SUBROUTINE 



86 000010 016767 

87 000016 005067 

88 000022 



OOOOOOG OOOOOOG SDRDSE::MOV 
OOOOOOG CLR 

RETL^N 



SACTHD.SRQSCH 
tSIGFL 



;SET DISPATCH TO FRONT OF LIST 

.'CLEAR TASK WAITING FOR SIGNIFICANT EVENT 

.-RETURN DIRECTIVE STATUS OF ♦! 



100 
101 
102 
103 
104 
105 

110 

111 

113 
1U 



♦•-$DRRAF-READ ALL EVENT FLAGS 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO FILL A FOU*^ WORD BUFFER WITH 
THE TASK LOCAL AND COMMON EVENT FLAGS. 

DPS FORMAT: 

WD. 00 — DIC(39.).DPfl SIZE(2.). 

WD. 01 — ADDRESS OF A FOUR WORD BUFr'ER. 

BUFFER FORMAT: 

WD. 00 — TASK LOCAL EVENT FLAGS 1-16. 

WD. 01 — TASK LOCAL EVENT FLAGS 17-32. 

WD. 02 — COMMON EVENT FLAGS 33-A8. 

WO. 03 ~ COMMON EVENT FLAGS 49-64. 



INPUTS: 



R2«A0»)R«SS OF THE TASK STATUS WORD OF THE CURRENT TASK. 
R3-AD0RESS OF THE BUFFER ADDRESS IN THE DPB. 
R4«ADDRESS OF THE HEADER OF THE CURRENT TASK. 
R5-ADPRESS OF THE TCB OF THE CURRENT TASK. 



tt** I **** 



DRSED MACRO Ml 108 U-DEC-77 20:01 PAGE 2-2 



115 

116 

117 

118 

119 

120 

121 

122 

123 

124 000024 

125 

126 

127 

128 

129 

130 

131 

132 

133 

134 

135 000026 

136 000032 

137 000036 

138 0000A2 

139 000046 
140 

141 
142 
143 
144 
145 
146 
147 
148 
149 
150 
151 
152 
153 
154 
155 
156 
157 
158 
159 
160 
161 
162 
163 
164 
165 

167 000050 

168 000052 

169 000054 

170 000056 
171 



OUTPUTS: (OIRECTIVF STATUS AND PS RETURNED TO TASK) 

C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 

DIRECTIVE STATUS OF +1 IS RETURNED. 
C=1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF •D.RS98' IS RETURNED IF BUFFER IS 
OUTSIDE OF ISSUING TASK'S ADDRESS SPACE. 



011303 



SDRRAF : :M0V 



(R3) ,R3 



.IF DF ASSCHKiMSSMGE 



016523 000022 

016523 000024 

016723 0000006 

016713 000002G 



030011 
001355 
050011 



MOV 
CALL 

.ENDC 



MOV 
MOV 
MOV 
MOV 
RETURN 



#4*2, R1 
SACHKP 



.-GET ADDRESS OF EVENT FLAG BUFFER 



.•SET LENGTH OF BUFFER IN BYTES 
.'ADDRESS CHECK PARAMETER BUFFER 



T.EFLG(R5),(R3)* ; INSERT LOCAL FLAGS 1-16 
T.EFLG*2(R5),{R3)* .-INSERT LOCAL FLAGS 17-32 



SC0MEF,(R3)t 
$C0MEFt2.(R3) 



INSERT COMMON FLAGS 33-48 
INSERT COMMON FLAGS 49-64 



•♦-IDRSEF-SET EVENT FLAG 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO SET AN EVENT FLAG AND 
REPORT IS POLARITY BEFORE SETTING. 



DPS FORMAT: 



WD. 00 
WD. 01 



DIC(33.),DPB SIZE(2.). 

EVENT FLAG NUMBER OF FLAG TO BE SET. 



INPUTS: 



RO'EVENT FLAG MASK WORD. 

R1 'EVENT FLAG MASK ADDRESS. 

R3sADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3>ADDRESS OF THE LAST WORD IN THE VPB*2. 

R4>ADDRESS OF THE HEADER OF THE CURRENT TASK. 

R5«ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

i C«0 WITH A DIRECTIVE STATUS OF 'O.RSOO' IF THE FLAG WAS 
I CLEAR OR 'D.RS2?' IF THE FLAG WAS SET. 



IDRSEF::B1T 
6NE 
BIS 

20$: DRSTS 
.DSABL 



?8i'"" 

R0.(R1) 
D.RSOO 
LSB 



TEST FLAG 

IF NE FLAG IS SET 

SET FLAG 

SET DIRECTIVE STATUS 



•••t E 3 •••« 



B^ AAA^^M •*« * l\m 



«^_l^>r_V9 9A.A4 



BAi%e )_• 



1 



DRSEO MACRO Ml 108 U-OEC-77 20:01 PAGE 2-3 



172 
173 
17A 
175 
176 
177 
178 
179 
180 
181 
182 
183 
184 
185 
186 
187 
188 
189 
190 
191 
192 
193 
19<. 
195 
196 
197 
198 
199 
200 
201 
202 
203 
204 
205 
206 
207 
208 
209 
210 
211 
212 
213 
2}^ 
215 
216 
217 
218 
219 
220 
221 
222 
223 



000060 016705 OOOOOOG 



000064 016500 000052 
000070 010567 OOOOOOG 
000074 



lit 

228 



**-STKySE-TASK VAITFOR SIGNIFICANT EVENT 

THIS ROUTINE IS CALLED TO EXECUTE A VAITFOR SIGNIFICANT EVENT DIRECTIVE FOR 
THE CURRENT TASK FROM WITHIN THE EXECUTIVE. 

INPUTS: 

NONE. 

OUTPUTS: 

A WAITFOR SIGNIFICANT EVENT DIRECTIVE IS EXECUTED FOR THE CURRENT 
TASK AND A RETURN TO THE CALLER IS EXECUTED. 



$TKWSE::MOV 



STKTCB.RS 



;GET ADDRESS OF CURRENT TASK TC8 



**-$DRWSE-UAITFOR SIGNIFICANT EVENT 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO SUSPEND THE EXECUTION OF THE 
ISSUING TASK UNTIL THE NEXT SIGNIFICANT EVENT. 



DPB FORMAT: 

WD. 00 
INPUTS: 



DIC(4V.),DPB SIZE(*.). 



R2«ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 
R3*ADDRESS Cf- THE LAST WORD IN THE [>n*2. 
R4«A0DRESS OF THE HEADER OF THE CURRENT TASK. 
R5'ADDRESS OF THF TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 



C«0 WITH A DIRECTIVE STATUS OF tl. 



M>RWSE : :MOV 
MOV 
CAILR 



T.ACTL(R5).R0 

RS.SSIGFL 

tSETRO 



GET TCB ADDRESS OF NEXT TASK 

SET TASK WAITING FOR SIGNIFICANT EVENT 

FORCE REDISPATCHING OF THE PROCESSOR 



*♦ 



••-iORWFL-WAfT FOR LOGICAL OR OF EVENT FLAGS 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO SUSPEND THE EXECUTION OF THE 
ISSUING TASK UNTIL ANY OF THE SPECIFIED EVENT FLAGS IS SET. 

DPB FORMAT: 



WD. 00 - DIC(43.).DPB Sl«(3.). 
WO. 01 -- EVENT FLAG SET INDICATOR. 
WD. 02 — EVENT FLAG MASK WORD. 



t*t* f I •••• 



riir- 



«i_K*»_w 9A.n< 



aAita 9_A 



DRSEO IWCRO mi 08 U-DEC-77 20:01 PAGE 2-* 



229 
230 
231 
232 
233 
234 
235 
236 
237 
238 
239 
240 
241 
242 
243 
244 
245 
246 
247 
248 
249 
250 
251 
252 

253 000100 

254 000102 

255 000106 

256 000110 

257 000112 

258 000114 

259 000116 

260 000122 

261 000124 

262 000130 

263 000132 

264 000134 

265 000136 
266 

267 
268 
269 
270 
271 

273 
274 
275 
276 
277 
279 
279 



012301 
020127 
101011 
006301 
011500 
001406 
020127 
002404 
062701 
000404 



000003 



000003 
1777746 



060501 

062701 000022 



3? 



EVENT PLA6 SETS: 



SET 
SET 1 
SET 2 
SET 3 



— EVENT FLAGS 1.-16. 

— EVENT FLAGS 17.-32. 

— EVENT FLAGS 33.-48. 
~ EVENT FLAGS 49.-64. 



INPliTS: 



R2>ADDftESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

; R3<ADDRESS OF THE SECOND WORD IN THE DF>B. 

; R4SADDRESS OF THE HEADER OF THE CURRENT TASK. 

; RS^ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C<:0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 
DIRECTIVE STATUS OF t1 IS RETURNED. 
C*1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF ■D.RS97' IS RETURNED IF AN 
ILLEGAL EVENT FLAG SET OR A ZERO EVENT 
FLAG NASK IS SPECIFIED. 



t 
i 
t 
i 
t 



tDRWFL: 



» 



(R3)*,R1 

R1,#3 

10$ 

R1 

(R3).R0 

10$ 

R1.*3 

20i 

«$C0»«F-4,R1 

$DRWfS 

D.RS97 

R5.R1 

«T.EFLG.R1 



GET EVENT FLAG SET 

LEGAL SET? 

IF HI NO 

CONVERT TO WORD INDEX 

GET EVENT FLAG NASK WORD 

IF EQ NO FLAGS SPECIFIED 

COMMON GLOBAL FLAG SET? 

IF LT NO 

POINT TO PROPER COMIWN FLAG WORD 

FINISH UP AS IF SINGLE FLAG 

SET DIRECTIVE STATUS 

ADD ADDRESS OF TASK TCB 

POINT TO PROPER TASK FLAGS WORD 



**-$DFWFS-MAITFOR SINGLE EVENT FLAG 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO SUSPEND THE EXECUTION OF THE 
ISSUING TASK UNTIL A SPECIFIED EVENT FLAG IS SET. 



DPS FORMAT: 



WD. 
WD. 



— DIC(41.).DP9 S1?E{2.). 

— EVENT FLAG NUMKR OF FLAG TO WAITFOR. 



INPUTS: 



RO'EVENT FLAG MASK WORD. 
R1 'EVENT FLAG MSK ADDRESS. 
W.4 

»-/ 

R4«ADDRESS OF THE HEADER OF THE CURRENT TASK. 
R5>ADDRESS OF THE TCB 0' THE CURRENT TASK. 



R2*AI>DRESS OF THE TASK STATUS WORD OF THE CURRENT fASK. 
R3-ADDRESS OF THE LAST WORD IN THE DP6»2. 



•••• ( I •••« 



t\m*Mt% M*rBn Hun* ii..n«r.77 ^Q>01 P*CF ^-4 



ORSED MACRO H1 108 U-OEC-77 20:01 PAGE 2-5 



286 
287 
288 

289 
290 
291 
292 
293 
29* 
295 
296 
297 



OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 
C«0 WITH A DIRECTIVE STATUS OF ♦!. 



000U2 005265 000034 

0Q0U6 01006A 000004 

000152 010164 000006 
000156 

000001 



SDRWFS::INC 
NOV 
MOV 
CALLR 

.END 



T.ST2(R5) 
RO.H.EFLM(RA) 
R1.H.EFLn«2(R4) 
ISETRT 



PUT TASK IN WAITFOR STATE 
SET WAITFOR MASK WORD 
SET WAITFOR MASK ADDRESS 
SET A SCHEDULE REQUEST 



•••• H I •••• 



MUh mkrun mirui u.brr.77 }Q'.M PACF P-A 



DRSED 


MACRO mi08 


U-OEC-77 20:01 PAGE 2-6 








SY«OL 


TABLE 












C»$ORE= 


OOOAOO 


H.RRVA 


000062 


TS.NRPs 


010000 


T.ST2 


D.RSOO= 


•**••• GX 


H.SPRl 


000060 


TS.0UT= 


000400 


T.ST3 


D.RS22» 


•*•♦♦♦ GX 


H.TKVA 


000026 


TS.RDN:: 040000 


T.TCBL 


D.RS97= 


•*••** GX 


H.TKVL 


000030 


TS.RUN^ 


004000 


T.UCB 


H»»RTZ= 


00007A 


H.VEXT 


000056 


TSSAIIs 


000001 


T2.AB0- 


H.CSP 


000000 


H.yND 


000044 


T»C11 = 


000001 


T2.AST= 


H.CUIC 


000010 


KSSCNT- 


177546 


TS$J16= 


000001 


T2.BFX- 


H.DSW 


0000A6 


KSSCSR- 


177546 


TSSKMG^ 


000000 


T2.CAF= 


H.DUIC 


000012 


K$$IEN< 


000115 


T$M11s 


000001 


T2.CHICS 


H.EFLM 


OOOOOA 


KStLDC: 


000001 


T.ACTL 


000052 


T2.CKD- 


H.EFSV 


OOOOAO 


KSSTPS' 


000074 


T.ASTL 


000016 


T2.DST= 


H.FCS 


000050 


NtSCRB- 


000124 


T.ATT 


000054 


T2.FXD= 


H.FORT 


000052 


RSSFIIs 


000001 


T.CPCB 


000004 


T2.HLT= 


H.FPSA 


0000A2 


RStJPOs 


000000 


T.DPRl 


000040 


T2.SPN= 


H.FF»VA 


OOOOM 


R$$JP1= 


000001 


T.EFLG 


000022 


T2.STP= 


H.CARD 


000072 


RSSJSU 


000001 


T.IOC 


000003 


T2.T10= 


H.HDLN 


000002 


RSSK11S 


000001 


T.LBN 


000041 


T2.WFR> 


H.IPC 


000016 


RSSP1U 


000001 


T.LOV 


000044 


T3.ACPS 


H.IPS 


OOOOU 


RSSXils 


000001 


T.LNK 


000000 


T3.CAL= 


H.ISP 


000020 


Rttiin« 000000 


T.nxsz 


000050 


T3.CLI= 


H.LUN 


000076 


RSt11S> 


000000 


T.NAM 


000006 


T3.MCR= 


H.NLUN 


00007A 


SSKCC* 


000000 


T.OFF 


000060 


T3.NET= 


H.WL 


000061 


S$»VSZ« 


001000 


T.PCB 


000046 


T3.NSD: 


H.OOVA 


000022 


TS.BLK= 


170700 


T.PRI 


000002 


T3.PMD= 


H.ODVL 


000024 


TS.C((P= 


000200 


T.RCVL 


000012 


T3.PRV= 


H.OVLY 


000054 


TS.CKRs 


000100 


T.RRFL 


000064 


T3.REMS 


M.PFVA 


000032 


TS.EXE= 


100000 


T.SRCT 


000063 


T3.R0V- 


H.RCVA 


000036 


TS.«S6« 


020000 


T.STAT 


000032 


T3.RST= 



000034 
000036 
000030 
000026 
000100 
100000 
004000 
000400 
020000 
010000 
040000 
002000 
000200 
000004 
000020 
001000 
000001 
100000 
000100 
001000 
004000 
000020 
000200 
040000 
010000 
020000 
000040 
000400 



. ABS. 000102 000 
000162 001 
ERRORS DETECTED: 

VIRTUAL HEMORV USED: 2795 WORDS ( 11 PACES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:15 

[41,2O]DRSED.SY0:C41.30]DRSED/-SP-C1.nEXEMC/ML.C41.10]RSXMC.C11.10]DRSE0 



T3.SLV= 

VWCTR- 

W.BA^ 

W.BfPD 

W.BHVR 

W.BLGH 

W.BLPO 

W.BLVR 

W.BNPO 

W.BQFF 

W.BPCB 

W.BSIZ 

SACTHD 

SCOMEFr 

SDRCEF 

SDRDSE 

SORRAF 

SDRSEF 

SDRWFL 

SORWFS 

SORWSE 

SRQSCH< 

tSETRQ: 

SSETRTs 

SSIGFL= 

»TICTCB= 

STKWSE 



002000 
000400 
000006 
OOOOU 
000004 
000020 
000016 
000002 
000015 
000012 
000000 
000010 

••••*• GX 

OOOOOORG 
00001 ORG 
000024RG 
OOOOSORG 
0001 OORG 
000U2RG 
000064RG 
♦* GX 
•• GX 
•• GX 
•• GX 
•• GX 
000060RG 



•••• I g *••• 




•t*t J I «t*« 



hDtci MAPttn HiinJi u.bFr-77 PO^OI pagf ? 



DRSST NACRO Ml 108 U-OEC-77 20:01 PAGE 2 



25 000000 
26 
7 



.TITLE DRSST 
. I DENT /03/ 



COPYRIGHT (C) 197«. 1976 

DIGITAL EQUIPMENT CORPORATION, NAYNARO, MASS. 

THIS SOFTUARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 03 

D. N. CUTLER 30-AUG-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 

MODIFIED BY: 

MACRO LIBRARY CALLS 



.MCAI L 
HDRDFS 



HDRDFS 



.■DEFINE TASK HEADER OFFSETS 



**-SDRSDV-SPECIFY DEBUGGING AID SST VECTOR 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RECORD THE ADDRESS AND LENGTH 
OF A VECTOR OF SST SERVICE ROUTINE ENTRY POINTS FOR USE BY AN INTRA- 
TASK DEGUGGING AID (E.G. ODT) 



DPB FORMAT: 

WD. 00 
VD. 01 
WD. 02 



Die (103.), DPB SIZE(3.). 

ADDRESS OF THE SST VECTOR. 

NUMBER OF ENTRIES IN THE SST VECTOR. 



SST VECTOR FORMAT: 



WD. 00 — TRAPS TO ^ (ODD ADDRESS, NONEX MEM. ETC.). 

WD. 01 — SEGMENT FAULT. 

WD. 02 — TRACE TRAP (T-flIT) OR EXECUTION OF BPT INSTRUCTION. 

WD. 03 — EXECUTION OF AN lOT INSTRUCTION. 

WD. OA — EXECUTION OF AN ILLEGAL OR RESERVED INSTRUCTION. 

WD. OS — EXECUTION OF A NON RSX EMT INSTRUCTION. 

WD. 06 — EXECUTION OF A TRAP INSTRUCTION. 

WD. 07 ~ PDP 11 MO FLOATING f»OINT EXCEPTION FAULT. 



INPUTS: 



R2>ADDRESS OF THE TAi^K STATUS WORD OF i CURRENT TASK. 
I R3«ADDRESS OF THE SECOND WORD IN THE DPB. 
I RA'ADDRESS OF THE HEADER OF THE CURRENT TASK. 
t RS'ADDRESS OF THE TCB OF THE CURRENT TASK. 



••tft K 8 *••• 



DR<i«.T MArnriMIIOi U-OEC-77 20:01 PAGE 2-1 



1 



DRSST MACRO MHOS H-OEC-77 20:01 PAGE 2-1 



OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK) 

C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED. 
DIRECTIVE STATUS OF +1 IS RETURNED. 
C=1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF •D.RS98' IS RETURNED IF PART OF VECTOR 
IS OUTSIDE OF ISSUING TASK'S ADDRESS SPACE. 
VECTOR ADDRESS OF ZERO IS SPECIFIED, OR THE 
VECTOR SIZE IS GREATER THAN 31. WORDS. 



70 000000 06270A 00002A 

71 OOOOOA 000A02 
72 

75 



.ENABL 
SDRSDV::ADD 
BR 



LS8 

#H.0DVL,RA 

10$ 



.•POINT TO ODT VECTOR LENGTH IN HEADER 
.•FINISH UP IN COMMON CODE 



••-SDRSTV-SPECIFV TASK SST VECTOR 

THIS DIRECTIVE INSTRUCTS THE SYSTEM TO RECORD THE ADDRESS AND LENGTH OF 
A VECTOR OF SST SERVICE ROUTINE ENTRY POINT FOR USE BY THE ISSUING TASK. 

DPB FORMAT: 

WD. 00 -- DIC(105.),DPB S1ZE(3.). 

WD. 01 — ADDRESS OF THE SST VECTOR. 

WD. 02 — NUMBER OF ENTRIES IN THE SST VECTOR. 



SST VECTOR FORMAT: 

WD. 00 — 

WO. 01 -- 

WD. 02 - 

WD. 03 " 

WD. 04 - 

WD. 05 -- 

WD. 06 - 

WD. 07 - 



TRAPS TO 4 (ODD ADDRESS. NONEX MEM. ETC.). 

SEGMENT FAULT. 

TRACE TRAP (T-BIT) OR EXECUTION OF A BPT INSTRUCTION. 

EXECUTION OF AN lOT INSTRUCTION. 

EXECUTION OF AN ILLECWM JR RESERVED INSTRUCTION. 

EXECUTION OF A NON RSX EMT INSTRUCTION. 

EXECUTION Of A TRAP INSTRUCTION. 

PDP 11M0 FLOATING POINT EXCEPTION FAULT. 



INPUTS: 



1! 

U 000006 062704 000050 



R2«ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK. 

R3=ADDRESS OF THE SECOND WORD IN THE DPB. 

R«=ADDRESS OF THE HEADER OF THE CURRENT TASK. 

R5«ADDRESS OF THE TCB OF THE CURRENT TASK. 

OUTPUTS: (Directive status and ps returned to task) 

C«0 IF directive is SUCCESSFULLY COMPLETED. 
DIRECTIVE STATUS OF *} IF RETURNED. 
C«1 IF DIRECTIVE IS REJECTED. 

DIRECTIVE STATUS OF 'D.RS98' IS RETURNED If PART Of VECTOR 
IS OUTSIDE Of ISSUING TASK'S ADDRESS SPACE, 
VECTOR ADDRESS Of ZERO IS SPECIflED, OR THE 
VECTOR SIZE IS GREATER THAN 31. WORDS. 

$DRSTV::ADD OH.fKVL.RA ;P01NT TO TASK VECTOR LENGTH IN HEADER 



•••• L 8 *••* 



DR^^T MACRO M11 08 U-DEC-77 20:01 PAGE 2-2 



ORSST MACRO Ml 108 U-DEC-77 20:01 PAGE 2-2 



000012 012300 

OOOOH 00U07 

000016 011301 

000020 00U03 

000022 021327 000037 

000026 10100A 



000030 0113U 
000032 0063U 
00003A 0U3AA 
000036 
0000^0 



000001 



10$: 


MOV 
BEQ 
MOV 
BEQ 
CMP 
BHI 


(R3)+,R0 

20$ 

(R3).R1 

15$ 

(R3),#1. 

30$ 




• IF DF 


A$$CHK!M$$MGE 




ASL 
CALL 


R1 
$ACHKW 




.ENDC 




15$: 
20$: 
30$: 


MOV 

ASL 

MOV 

RETURN 

ORSTS 

.DSABL 


(R3).(R*) 

(R4) 

-(R3),-(R«) 

D.RS98 
LS6 



GET ADDRESS OF VECTOR 
IF EQ DEASSIGN VECTOR 
GET LENGTH OF SST VECTOR 
IF EQ DEASSIGN VECTOR 
VECTOR TOO BIG? 
IF HI YES 



.•CONVERT LENGTH TO BYTES 
.-ADDRESS CHECK SST VECTOR 



SET SST VECTOR LENGTH 
CONVERT LENGTH TO BYTES 
SET SST VECTOR ADDRESS 
RETURN DIRECTIVE STATUS OF ♦! 
SET DIRECTIVE STATUS 



.END 



*•*• M 8 **** 



DMiT MACRO Ml 108 U-DfC-77 20:01 PAGF 2-5 



DRSST MACRO Ml 108 
SYMBOL TABLE 



U-OEC-77 20:01 PAGE 2-3 



Ct$ORE= 
D.RS9l= 


OOOAOO 


H.HDLN 


000002 


****** GX 


H.IPC 


000016 


HSMTZ^: 


0C0074 


H.IPS 


OOOOU 


H.CSP 


000000 


H.ISP 


000020 


H.CUIC 


000010 


H.LUN 


000076 


H.DSW 


0000A6 


H.NLUN 


000074 


H.OUIC 


000012 


H.r«L 


000061 


H.EFLR 


OOOOOA 


H.OOVA 


000022 


H.EFSV 


OOOOAO 


H.ODVL 


C0002A 


H.FCS 


000050 


H.OVLY 


000054 


H.FORT 


000052 


H.PFVA 


000032 


H.FPSA 


0OO0A2 


H.RCVA 


000036 


H.FPVA 


00003A 


H.RRVA 


000062 


H.GARD 


000072 


H.SPRI 


000060 


. ABS. 


000102 000 
0OOOA2 001 






ERRORS 


DETECTED: 







H.TKVA 

H.TKVL 

H.VEXT 

H.WND 

KS$CNT= 

K$$CSR= 

KSSIENs 

KMLDC= 

K$$TPS= 

MStCRB= 

R$$F11= 

RSSJPO- 

RSSJFU 



000026 
000030 
000056 
000044 
177546 
177546 
000115 
000001 
000074 
000124 
000001 
000000 
000001 



RSSJS1= 
RS$K11= 
R$SP11= 
RSSX11= 
RSS11M= 
RSSIIS^ 
S$»ECC= 
S»$YSZ= 
T$»A11= 
T$$C11= 
TS»J16= 
TSSKMG= 
T$$«11= 



000001 
000001 
000001 
000001 
000000 
000000 
000000 
001000 
000001 
000001 
000001 
000000 
000001 



VSSCTR: 


000400 


W.BATT 


000006 


W.8FPD 


000014 


W.BHVR 


000004 


W.BLGH 


000020 


W.BLPD 


000016 


W.BLVR 


000002 


W.BNPD 


000015 


W.BOFF 


000012 


W.BPCB 


000000 


W.BSIZ 


000010 


SDRSDV 


OOOOOORG 


SDRSTV 


000006RG 



VIRTUAL MEMORY USED: 1782 WORDS ( 7 PAGES; 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:10 

C41.20]DRSST,SYO:C41.303DRSST/-SP=C1.1]EXEMC/ML.C41.10]RSXMC.C11.10]DRSST 
s " 



•••t H I *••• 




tt** I 9 •••« 



BFCTL MACRO MIIOB U-OEC-77 20:01 PAGE 2 



32 000000 
33 



5« 000000 
55 



011646 



» 



.TITLE BFCTL 
. I DENT /06/ 



COPYRIGHT (C) iy7A. 1978 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND KAy ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 06 

D. N. CUTLER 26-DEC-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
T. J. MILLER 

MODIFIED BY: 

T. J. MILLER 2-NOV-77 

TM116 — SAVE AND RESTORE MAPPING REGISTERS IN SBLXIO. 

BUFFER CONTROL ROUTINES 

MACRO LIBRARY CALLS 



.MCALL HWDDFS 
HWDDFS 



; DEFINE HARDWARE REGISTERS 



•♦-SGTBYT-GET NEXT BYTE FROM USER BUFFER 

THIS ROUTINE IS CALLED TO GET THE NEXT BYTE FROM THE USER BUFFER 
AND RETURN IT TO THE CALLER ON THE STACK. AFTER THE BYTE HAS BEEN 
FETCHED, THE NEXT BYTE ADDRESS IS INCREMENTED. 

INPUTS: 

R5=ADDRESS OF THE UCB THAT CONTAINS THE BUFFER POINTERS. 

OUTPUTS: 

THE NEXT RVTE IS FETCHED FROM THE USER BUFFER AND RETURNED 

TO THF (ALLER ON THE STACK. THE NEXT BYTE ADI/RESS IS INCREMENTED. 

ALL REGISTERS ARE PRESERVED ACROSS CALL. 



.ENABL LSB 
IGTeYT::MOV {SP).-(SP) 



.-DUPLICATE RETURN ADDRESS 



.IF DF MSSMGE 



•••• C 9 *•** 



BFCTL HACRO MHOS U-OEC-77 20:01 PAGE 2-1 



(A 

65 

66 000002 

67 



71 000010 



117566 000002G 000002 



OOOAOA 



92 

93 000012 

9A 



MOV 
MOV 
MOVB 
MOV 

.IFF 

MOVB 

.ENDC 



KISAR6,-(SP) ;SAVE CURRENT MAPPING 
U.BUF(R5).KISAR6 ;MAP TO USER BUFFER 
aU.BUF+2(R5).4(SP) ;GET NEXT BYTE FROM USER BUFFER 
(SP)+,KISAR6 ;RESTORE CURRENT MAPPING 



aU.BUF*2(R5).2(SP) ;GET NEXT BYTE FROM USER BUFFER 



20S 



;TAKE COMMON EXIT FOR ADDRESS UPDATE 



**-$PTBYT-PUT NEXT BYTt IN USER BUFFER 

THIS ROUTINE IS CALLED TO PUT A BYTE IN THE NEXT LOCATION IN 

USER BUFFER. AFTER THE BYTE HAS BEEN STORED. THE NEXT BYTE ADDRESS 

IS INCREMENTED. 



INPUTS: 



R5-ADDRESS OF THE UCB THAT CONTAINS THE BUFFER POINTERS. 
2{SP)=aVTE TO BE STORED IN THE NEXT LOCATION OF THE USER BUFFER. 



OUTPUTS: 



THE BYTE IS STORED IN THE USER BUFFER AND REMOVED FROM 
THE STACK. THE NEXT BYTE ADDRESS IS INCREMENTED. 



; ALL REGK^TERS ARE PRESERVED ACROSS CALL. 
SPTBYT:: ;REF LABEL 

.IF DF MSSMGE 



IOC 

101 

102 

103 

10A 

105 000012 116675 000002 000002G 

106 

107 

108 

109 

110 000020 012616 

111 

112 

113 

1U 



MOV 
MOV 
MOVB 
MOV 

.IFF 



KISAR6,-(SP) .SAVE CURRENT MAPPING 
U.BUF(RS).P(ISAR6 ;MAP TO USER BUFFER 
4(SP),au.8UFt2(R5) .-STORE BYTE IN USER BUFFER 
{SP)*.K1SAR6 ; RESTORE CURRENT MAPPING 



MOVB 2(SP),8U.BUF*2(R5) .-STORE BYTE IN USER BUFFER 
.ENDC 

MOV {SP)»,(SP) ; COLLAPSE STArK REMOVING BYTE 

.IF DF GSlWRDiPSSWRD 



BFCTL MACRO Ml 108 U-DEC-77 20:01 PAGE 2-2 



115 

116 

117 

118 

119 

120 

121 

122 

123 

12A 

125 

126 

127 

128 

129 

130 

131 

132 

133 

134 

135 

136 

137 

138 000022 

139 

HO 

HI 

H2 

H3 

1A4 

U5 

U6 

y^7 

U8 
K9 
150 
151 
152 
153 
15* 
155 
156 
157 
158 
159 
160 
161 
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 



BR 



20S 



;TAKE COMMON EXIT FOR ADDRESS UPDATE 



t 
; 



**-SGTWRD-6ET NEXT WORD FROM USER BUFFER 

THIS ROUTINE IS CALLED TO GET THE NEXT WORD FROM THE USER BUFFER 
AND RETURN IT TO THE CALLER ON THE STACK. AFTER THE WORD HAS BEEN 
FETCHED. THE NEXT WORD ADDRESS IS CALCULATED. 

INPUTS: 

R5=ADDRESS OF THE UCB THAT CONTAINS THE BUFFER POINTERS. 

OUTPUTS: 

THE NEXT WORD IS FETCHED FROM THE USER BUFFER AND RETURNED 

TO THE CALLER ON THE STACK. THE NEXT WORD ADDRESS IS CALCULATED. 

ALL REGISTERS ARE PRESERVED ACROSS CALL. 



SGTWRD: 



.IFTF 

.IF DF G$SWRD 

MOV {SP),-(SP) 

.IF DF MSSMGE 



;REF LABEL 



.■DUPLICATE RETURN ADDRESS 



MOV 
MOV 
MOV 
MOV 

.IFF 



KISAR6,-(SP) .-SAVE CURRENT MAPPING 
U.BUF(R5).KISAR6 ;MAP TO USER BUFFER 
aC.BUF«?(RS).A(SP) .-GET NEXT WORD FROM USER BUFFER 
(SP)«,KISAR6 .-RESTORE CURRENT MAPPING 



MOV aU.BUF«2(R5).2(SP) .GET NEXT WORD FROM USER BUFFER 
.ENOC 



10$ 



.-TAKE COMMON EXIT FOR ADDRESS UPDATE 



.ENOC 



••-$PTWRD-PUT NEXT WORD IN USER BUFFER 

THIS ROUTINE IS CALED TO PUT A WORD IN THE NEXT LOCATION IN 

USER BUFFER. AFTER THE WORD HAS BEEN STORED. THE NEXT WORD ADDRESS 

IS CALCULATED. 



•••• ( 9 •••• 



BFCTL MACRO W1108 U-DEC-77 20:01 PAGE 2-3 



172 
173 
17A 
175 
176 
177 
178 
179 
180 
181 
182 
183 
184 
185 
186 
187 
188 
189 
190 
191 
192 
193 
194 
195 
196 
197 
198 
199 
200 
201 
202 
203 
204 
205 
206 
207 
208 
209 
210 
211 
212 
213 
2\^ 
215 
216 
217 
218 
219 
220 
221 
222 
22i 
22'* 
225 

fl? 

2^8 



INPUTS: 

R5=A0DRESS OF THE UCB THAT CONTAINS THE BUFFER POINTERS. 
2(SP)=W0RD TO BE STORED IN THE NEXT LOCATION OF THE BUFFER. 

OUTKJTS: 

THE WORD IS STORED IN THE USER BUFFER AND REMOVED FROM 
; THE STACK. THE NEXT WORD ADDRESS IS CALCULATED. 

; ALL REGISTERS ARE PRESERVED ACROSS CALL. 



000022 



tPTWRD: 



000022 005265 000002G 



10S: 



201: 



MOV 
MOV 
MOV 
MOV 

.IFF 



INC 



:REF LABEL 



.IF DF PSSWRD 



.IF DF MSSMGE 



KISAR6.-(SP) .SAVE CURRENT NAPPING 
U.BUF(R5),KISAR6 :MAP TO USER BUFFER 
4(SP).aU.BUFt2(R5);STORE WORD IN USER BUFFER 
(SP)«,ICISAR6 ;RESTORE CURRENT MAPPING 



MOV 2(SP).au.BUFt2(R5) .STORE WORD IN USER BUFFER 
.ENOC 



MOV (SP)t.(SP) 
.ENDC 

.IFT 

INC U.8UF»2(R5) 

.ENDC 



; COLLAPSE STACK REMOVING WORD 



U.BUFt2(R5) 



.'CALCULATE ADDRESS OF NEXT WORD 



; INCREMENT NEXT BYTE ADDRESS 



.IF DF MtlMGE 

CMP y.BUF*2(R5>. #160000 .-OVERFLOW 2BK BOUNDARY? 

BLO 30S :ir lO NO 

SUB #20000. U.BUFt2(R5> ;REDUCF BY 4K 

ADD «200.U.BUF(R5) ;ADJUST RELOCATION BIAS 

.ENOC 



••t* f 9 •••• 



rr:. 



>*-«« «A.A« 



BFCTL KIACRO I«I1108 U-OEC-77 20:01 PAGE 2-A 



229 

230 000026 

231 

232 

233 

234 

235 

236 

237 

238 

239 

2A0 

2*1 

2i>2 

2A3 

244 

245 

246 

247 

248 

249 

250 

251 

252 

253 

254 

255 

256 

257 

258 

259 

260 

261 

262 

263 

264 

265 

266 

267 

268 

269 

270 

271 

272 

273 

274 

r' 
276 

277 
279 
279 
280 
281 

Hf 



30t: 



RETURN 
.DSABL 



LSB 



^ 



••-tGTCM>-6ET NEXT yORD FROM USER CONTROL BUFFER 

THIS ROUTINE IS CALLED TO GET THE NEXT WORD FROM THE USER CONTROL 
BUFFER AND RETURN IT TO THE CALLER ON THE STACK. AFTER THE WORD HAS 
BEEN FETCHED. THE NEXT WORD ADDRESS IS CALCULATED. 

INPUTS: 

R5»ADDRESS OF THE UCB THAT CONTAINS THE BUFFER POINTERS. 

OUTPUTS: 

THE NEXT WORD IS FETCHED FROM THE USER CONTROL BUFFER AND RETURNED 
TO THE CALLER ON THE STACK. THE NEXT WORD ADDRESS IS CALCULATPD. 

ALL REGISTERS ARE PRESERVED ACROSS CALL. 



.IF DF AtSD01!AlSF11!ISSCAD!USSA0M 

»6TCW0::«0V (SP),-(SP) .DUPLICATE RE TURN ADDRESS 

.IF DF mSMCE 

MOV KISAR6,-(SP) .SAVE CURRENT MAPPING 

mt U.CBF(R5),KISAR6 .NAP TO USER CONTROL BUFFER 

mi au.CBFt2(R5}.4(SP) .GET NEXT WORD FROM USER BUFFER 

mi (SP)*.KISAR6 ;RESTORE CURRENT MAPPING 



IFF 



lOli 



.IFTF 

AOD 

.IFT 

I 

.ENDC 



RETURN 
.ENDC 



au.CBF*2(R5).2(SP) ;GET NEXT WORD FROM USER BUFFER 



l'2.U.CBF*2<R5> .-CALCULATE ADDRESS OF NEXT WORD 



#20000. U.CBF«?(R5> .OVERFLOW 4K BOUNORY? 
l6» :ir EO NO 

*20O0O,U.CSr*2(R5) .CLEAR OVERFLOW BIT 
4'200.U.CBF(R5> ;A0JUST RELOCATION BIAS 



•••• ( 9 •••• 



■ mmmm^ «&&*&«« «*4 «f 



«i_jkBr_w 9A.ni BAi;c 3_ft 



BFCTL tUCHO mi08 U-OCC-77 20:01 PAGE 2-5 



286 
287 
288 

289 
290 
291 
292 
295 
294 
295 
296 
297 
298 
299 
300 
301 
302 
303 
304 
305 
306 
307 
308 
309 
310 
311 
312 
313 
3U 
315 
316 
317 
318 
319 
320 
321 
322 
323 
324 
325 
326 
327 
328 
329 
330 



334 
335 

\1» 

338 

339 

it? 

342 



**-SaLXl0-fl0VE BLOCK OF DATA. 

THIS ROUTINE IS CALLED TO HOVE DATA IN MEnORV IN A MAPPED SYSTEM. 

INPUTS: 

RO«Nll«ER OF BYTES TO MOVE. 
R1 -SOURCE APR5 BIAS. 
R2>S0URCE DISPLACEMENT. 
RS'DESTINATION APR6 BIAS. 
R4>DESTINATI0N DISPLACEMENT. 



OUTPUTS: 



t 
t 
t 
t 
I 
t 



DESCRIBED MOVE IS ACCOMPLISHED. 

RO ALTERED. 

R1 R3 PRESERVED 

R2!R4 POINT TO LAST BYTF OF SOURCE AND DESTINATION 



♦ 1 



NOTE: THE COUNT INPUT IN RO MUST NOT BE ZERO AND IT MUST NOT 
BE LARGE ENOUGH TO CROSS APR BOUNDARIES (THIS TYPICALLY 
MEANS A MAXIMUM OF 4K-«;). 



.IF DF MMI»iE 



TM116 
»*-1 

TM116 
TM116 
TM116 
TM116 



XIO::MOV R5.-(SP) 

IV «KISAR6.R5 
(R5),-(SP) 
R3.<R5) 
-(R5),-(SP) 
R1,(RS) 



SAVE R5 


TM116 


POINT TO KERNEL APR6 


• TM116 


SAVE KERNEL APR6 


• TM116 


SET UP KERNEL APR6 FOR TRANSFER 


TM116 


SAVE KERNEL APR5 


TMn6 


SET UP KERNEL APRS FOR TRANSFER 


TM116 




•-3 



t«l 



mt 



.IF NDF NIIMOV 

MOVB (R2>*.(R4)t 
DEC RO 
101 



#1,-(SP) 

(SP),R2 

10$ 

(R2)«.(R4)« 

RO 

($P).R4 

50S 

«NSSM0V*2.R0 

40S 

RO.(SP) 

30i 



.IFF 



MOVB 



MOVE NEXT BYTE 
MORE TO MOVE? 
IF NC YES 



PUSH LOW BIT MASK 

SOURCE ADDRESS ODD? 

IF EO NO 

MOVE FIRST BYTE 

REDUCE COUNT 

DESTINATION ADDRESS ODD? 

IF NE YES. PERFORM BYTE MOVES 

MOVE ENTIRE BLOCK? 

IF CC YES 

REMAINING COUNT ODD? 

IF NE NO 



•••• H 9 •••• 



ri: 



mArmn Miina ii..hcr.77 sn-ni DAr.c ).A 



BFCTL MACRO Ml 108 U-OEC-77 20:01 PAGE 2-6 



343 
34A 
345 
346 
347 
348 
349 
350 
351 
352 
353 
354 
355 
356 
357 
358 
359 
360 
361 
362 
363 
364 
365 
366 
367 
368 
369 
370 
371 
372 
373 
374 
375 
376 
377 
378 
379 
380 
381 
382 
383 
384 
15 



387 
388 



IS!; 


DfC 
SUB 


RO 

RO.PC 


ADJUST NEGATIVE COUNT 

INDEX INTO MOVE INSTRUCTIONS 

REF LABEL 




.REPT 


NSSMOV 






NOV 


{R2)*.(R4)* 


MOVE A WORD 




.ENOR 






50$: 
60S: 


ASL 
SUB 
BCC 
SUB 


RO 

i*NSSM0V*2,R0 

70S 

RO.PC 


IF CC MORE TO GO 

EXIT THROUGH COMMON CODE 

DOUBLE COUNT 

MOVE ENTIRE BLOCK? 

IF CC VES 

-ELSE INDEX INTO MOVE INSTRUCTIONS 
•REF LABEL 




.REPT 


NSMQV 






MOVB 


(R2)*.(R4)» 


MOVE A BYTE 




.ENDR 






80S: 
90S: 


BCC 
TST 
BNE 
WVB 

.ENOC 


60S 

<SP)» 

90S 


-IF CC MORE TO GO 
POP CONSTANT 
IF NE NO MORE TO MOVE 
MOVE LAST BYTE 
REF LABEL 




S 

RETURN 


(SP)*,(R5)* 

(SP)*.(R5) 

(SP)*.R5 


RESTORE KERNEL APRS 
RESTORE KENREN APR6 
RESTORE R5 

t 



; TMn6 
; TM116 
: TMn6 
;«.-2 



000001 



.ENOC 



.END 



•••• I 9 •••• 



MArmn mina l/..AKr.77 sn.ni OArj: 9-7 



BFCTL MACRO M1108 
SVnOL TABLE 



U-OEC-77 20:01 PAGE 2-7 



CSSORE^ 

FE.CAL= 
FE.CEX= 
FE.ORV= 
FE.EXP= 
FE.EXT* 
FE.EXV= 
FE.LS1= 
FE.HUP* 
FE.nXT* 
FE.NLGt: 

. ABS. 



OOOAOO 
000040 
OPOOOO 
000010 
000200 
000001 
000004 
000400 
000002 
040000 
100000 



FE.PKT= 
FE.PLAs 
HSSRTZs 
KtSCNTr 
KSSCSR- 
KtSIEN- 
KSSLDC= 
«$TPS« 
MPAR = 
IVCSR = 
mSCRB» 



000100 
000020 
000074 
177546 
177546 
000115 
000001 
000074 
172100 
177746 
000124 



PIRQ := 


^7777^ 


PRO = 


000000 


PR1 = 


000040 


PR4 = 


000200 


PR5 = 


000240 


PRo — 


000300 


PR7 = 


000340 


PS 


177776 


R»$Fn= 


000001 


R$$JPOs 


000000 


R$»JP1= 


000001 



RttJS1» 
R$SIC11 = 
R»SP11= 
RSSXII- 
RSS11H: 
RtS11S= 
SWR - 
S»$ECC= 
S»«YSZ= 
TPS = 
TWA11 = 



000001 
000001 
000001 
000001 
000000 
000000 
177570 
000000 
001000 
177564 
000001 



T$$C11= 

T$»J16= 

rSSKMG- 

TS$«11= 

U.BUF = 

V$$CTRs 

SGTBYT 

SGTWRD 

SPTBVT 

SPTWRD 



000001 
000001 
000000 
000001 

****** QX 

000400 
OOOOOORG 
000022RG 
00001 2RG 
000022RG 



000000 
000030 
ERRORS DETECTED: 



000 
001 



VIRTUAL MEMORY USED: 1768 WORDS ( 7 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:13 
C41.203BFCTL,SYO:C41.30]BFCTL/-SP=C1.1]EXEMC/ML.C41,10DRSXMC.C11.10]BFCTL 



•••• J 9 •••• 



y I L 




•*•• K 9 *««t 



rr 



niiki MArDO MIIOR U>nFr.77 70!01 PAGF } 



CORAL MACRO Ml 108 U-OEC-77 20:01 PAGE 2 



1 
2 
3 
4 
5 
6 
7 
8 
9 
10 

n 

12 
13 
1A 
15 
16 
17 
18 
19 
20 
21 
22 
25 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 



000000 
000000 



000000 012700 177776G 



.TITLE CORAL 
.IDENT /07/ 



COPYRIGHT (C) 1974. 1976 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, »\ASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 07 

D. N. CUTLER 3-AUG-73 

PREVIOUSLY MODIFIED BY: 



CUTLER 
MILLER 



MODIFIED BY: 

CORE BUFFER ALLOCATION ROUTINES 

MACRO LIBRARY CALLS 



• MCALI. CLKDFS.PKTDFS 

CLKD=$ 

PKTDFS 



.•DEFINE CLOCK QUEUE CONTROL BLOCK OFFSETS 
.•DEFINE I/O PACKET OFFSETS 



••-SALOCB-ALLOCATE CORE BUFFER 
♦•-fALOCI-ALLOCATE CORE BUFFER (ALTERNATE ENTRY) 

THIS ROUTINE IS CALLED TO ALLOCATE AN EXEC CORE BUFFER. THE ALLOCATION 
ALGORITHM IS FIRST FIT AND BLOCKS ARE ALLOCATED IN MULTIPLES OF FOUR 
BYTES. 



INPUTS: 



RO=ADDRESS OF CORE ALLOCATION LISTHEAD-? IF ENTRY AT SAL0C1. 
R1=S1ZE OF THE CORE BUFFER TO ALLOCATE IN BYTES. 

OUTPUTS: 

; C«1 IF INSUFFICIENT CORE IS AVAILABLE TO ALLOCATE THE BLOCK. 
I C«0 IF THE BLOCK IS ALLOCATED. 

; RO«ADDRESS OF THE ALLOCATED BLOCK. 

R1 'LENGTH OF BLOCK ALLOCATED 



.EN.^BL 
SALOCB::MOV 



LS6 

#$CRAVL-2.R0 



; POINT TO ALLOCATION MASK WORD 



.IF DF QttOPT 



J 



*••• I, 9 *••• 



MArnn mins ii..ncr.77 }n>ni darf ?»1 



CORAL MACRO Ml 108 U-DEC-77 20:01 PAGE 2-1 



7A OOOOOA 

75 000006 

76 000010 

77 000012 

78 OOOOU 

79 000016 

80 000020 

81 000022 

82 000026 

83 000030 

84 000032 

85 000034 

86 000036 

87 000040 

88 000042 

89 000044 

90 000046 

91 000050 

92 000052 
93 



11 



12 000054 



14 



000060 



061001 
04200! 
000261 
0(»I417 
0'0002 
011200 
0C1414 
026001 
103772 
001407 
005720 
160110 
060001 
011011 
014041 
010110 
160001 
011012 



012701 
000405 



000002 



ROUND TO NEXT BOUNDARy 

IF FQ ZERO LENGTH REQUEST 

REQUEST SIZE OF PACKET? 

IF NE NO 

POINT TO PACKET AVAILABLE POINTER 

PICK UP PACKET POINTER 

IF EQ THERE IS NONE 

UNLINK PACKET FROM LIFO LIST 

INDICATE ONE PACKET LESS IN LIST 

POINT BACK TO ALLOCATION MASK WORD 



ROUND TO NEX; BOUNDARY 

CLEAR EXCESS 

ASSUME ZERO LENGTH BLOCK 

IF EQ ZERO LENGTH REQUEST 

SAVE ADDRESS OF CURRENT BLOCK 

GET ADDRESS OF NEXT BLOCK 

IF EQ END OF CHAIN 

BLOCK BIG ENOUGH? 

IF LO NO 

IF EQ BLOCK IS EXACT SIZE 

POINT TO SIZE OF FREE BLOCK 

CALCULATE SIZE REMAINING 

POINT TO NEW FREE BLOCK 

COPY SIZE 

COPY LINK 

STORE LINK TO NEW FREE BLOCK 

RESTORE SIZE OF BLOCK 

UPDATE LINK TO NEW FREE BLOCK 



**-?VNLCLK-ALLOCATE CLOCK QUEUE CORE BLOCK 

THI;. ROUTINE IS CALLED TO ALLOCATE A CORE BLOCK FOR A CLOCK QUEUE ENTRY. 

INPUTS: 

NONE. 

OUTPUTS: 

i IF INSUFFICIENT CORE IS AVAILABLE TO ALLOCATE THE BLOCK, THEN A 

i DIRECTIVE STATUS OF 'D.RSI' IS RETURNED. ELSE THE A'>DRESS OF 

/ THE ALLOCATED BLOCK IS RETURNED TO THE CALLER IN RO. 





ADD 


(RO).RI 




BIC 


(R0)*.R1 




BE^ 


5$ 




CMP 


R1,#I.LGTH 




BNE 


5$ 




MOV 


#$PKAVL.R2 




MOV 


(R2),R0 




BEQ 


4$ 




MOV 


(R0).(R2)* 




DEC 


(R2) 




RETURN 




4S: 


MOV 
.ENDC 


#$CRAVL-2.R0 


SALOCI 


:ADD 


<R0).R1 




BIC 


(R0)*,R1 


5»: 


SEC 






BEQ 


30$ 


10$: 


MOV 


R0,R2 




MOV 


(R2),R0 




BEQ 


30$ 




CMP 


2(R0),R1 




BLO 


10$ 




BEQ 


20$ 




TST 


(RO)* 




SUB 


R1,(R0) 




ADD 


R0.R1 
(R0),(R1) 




MOV 




MOV 


-(RO).-(RI) 




MOV 


R1,(R0) 




SUB 


R0.R1 


20$: 


MOV 


(r6).(R2) 


30$: 


RETURN 






.DSABL 


LSB 



000020 



.ENABL LSB 

$ALCLK::H0V #C.L6TH,R1 
BR 10$ 



.•PICK UP LENGTH Of CLOCK BLOCr 



**•• M 9 •»«* 



Ct»AL MACnn Ml 108 U-DEC-77 20:01 PAGE 2-2 



CORAL MACRO mi08 U-DEC-77 20:01 PAGE 2-2 



130 000062 012701 000020 

131 000066 00OA10 
132 



41 



150 000070 012701 0000«i« 

151 00007A 

152 000100 103036 

153 000102 
15A 

^5 



69 

70 00010* 012701 0000<.H 
71 



♦♦-SDECLK-DEALLOCATE CLOCK QUEUE CORE BLOCK 

THIS ROUTINE IS CALLED TO DEALLOCATE A CORE BLOCK THAT WAS BEING USED 
FOR A CLOCK QUEUE ENTRY. 

INPUTS: 

RO^ADDRESS OF THE CORE BLOCK TO BE DEALLOCATED. 
OUTPUTS: 

THE CLOCK QUEUE ENTRY CORE BLOCK IS DEALLOCATED. 



SDECLK::MOV 
BR 



*C.LGTH,R1 
SDEACB 



;PICK UP LENGTH OF CLOCK BLOCK 



••-lALPKT-ALLOCATE SEND OR I/O REQUEST CORE BLOCK 

THIS ROUTINE IS CALLED TO ALLOCATE A CORE BLOCK FOR A SEND OR I/O 
REQUEST QUEUE ENTRY. 

INPUTS: 

NONE. 

OUTPUTS: 

i IF INSUFFICIENT CORE IS AVAILABLE TO ALLOCATE THE BLOCK. THEN A 

t DIRECTIVE STATUS OF 'D.RSI* IS RETURNED. ELSE THE ADDRESS OF 

THE ALLOCATED BLOCK IS RETURNED TO THE CALLER IN RO. 



IALPKT::MOV #I.LGTH,R1 

10S: CALL SALOCB 

BCC 80S 

DRSTS D.RSI 



SET LENGTH OF I/O PACKET 
ATTEMPT TO ALLOCATE BLOtK 
ir CC SUCCESSFUL 
ALLOCATION FARiJRE 



»»-$DEPKT-DEALLOCATE SEND OR I/O REQUEST CORE BLOCK 

THIS ROUTINE IS CALLCD TO OEALLOCATE A CORE BLOCK ^MAT WAS BEING USED 
FOR A SEND OR I/O REQL'FST (lUlL'E ENTRY. 

INPUTS: 

RO'ADDRESS OF rHt CORE BLOCK TO BE DEALLOCATED. 

OUTF-UTS: 

; TME SHND OR i/0 REQUEST QUEUE lNTRY CORE BLOCK IS DEALLOCATED. 

IDEPKT;:M0V *I.ICTH.R1 .-SET LEN-itH OF I/O PACKET 

•*** ^ 9 *••* 



rORAL MACRO Ml 108 U-DEC-77 20:01 PAGE 2-3 



95 000110 



012703 177776G 



**-SDEACB-DEALLOCATE CORE BUFFEVI 
•*-$DEAC1-0EAl.L0CATE CORE BUFFER (ALTERNATE ENTRr) 

THIS ROUTINE IS CALLED TO DEALLOCATE AN EXEC CORE BUFFER. THE BLOCK IS 
INSERTED INTO THE FREE BLOCK CHAIN BY CORE ADDRESS. IF AN ADJACENT 
BLOCK IS CURRENTLY FREE, THEN THE TUO BLOCKS ARE MERGED AND INSERTED 
IN THE FREE BLOCK 04AIN. 



INPUTS: 



RO^ADDRESS OF THE CORE BUFFER TO BE DEALLOCATED. 
R1-SIZE OF THE CORE BUFFER TO DEALLOCATE IN BYTES. 
R3sADDRESS OF CORE ALLOCATION LISTHEAD-2 IF ENTRY AT SDEAC1. 



OUTPUTS: 



THE CORE BLOCK IS MERGED INTO THE FREE CORE CHAIN BY CORE 
ADDRESS AND IS AGCOMERATED IF NECESSARY WITH ADJACENT BLOCKS. 



SDEACB: :MOV 



ADD 

BIC 

BEQ 

CMP 

BNE 

MOV 

CMPB 

BLOS 

INC 

MOV 

MOV 

RETURN 

.ENDC 



#$CRAVL-2,R3 ;POINT TO ALLOCATION MASK 'WORD 



.IF DF OlfOPT 



(R3),R1 

(R3)»,R1 

SOS 

R1.#I.L6TH 

30i 

/VSPKMAX.R2 

(R2).-(R2) 

30S 

(R2) 

-(R2).(R0) 

R0,(R2) 



ROUND TO NEXT BOU'JDARY 

IF EQ NO BLOCK TO RELEASE 

LENGTH EOUAL TO I/O PACr.ET? 

IF NE NO 

PNT TO MAX # OF PACKETS TO PREALLOCATE 

MAX NUMBER PREALLOCATED? 

IF LOS <ES 

INDICATE ONE MORE AVAILABLE 

LINK PACKET INTO LIFO LIST 



I 



2^^> 0001 u 

215 000116 

216 000120 

217 000122 



061301 
0*2301 
00U26 



tDEAC1::ADD (R3>,R1 .-ROUND TO NEXT BOUNDARY 

BIC (R3)SR1 ;CLEAR EXCESS 

BEQ 80$ ;IF EO NO BLOCK TO RELEASE 

30t: ;REF LABEL 



>7 000124 011 
228 000126 OOU02 



'M 



«0$: 



.IF DF 
MOV 

.irif 

MOV 
MOV 
BEQ 



RMDER 
R3.-(SP) 



R3.R2 

(R2).R3 

50t 



;SAVE ADDRESS OF LISTHEAD 



;SAVE ADDRESS OF CURRENT BLOCK 
;GET ADDRESS OF NEXT BLOCK 
:IF EQ END OF CHAIN 



•••• t 10 ••«• 



CORAL MACRO Ml 108 U-OEC-77 20:01 PAGE 2-A 



229 000130 

230 000132 

231 0001 3A 

232 000136 

233 OOOUO 



256 0OOU4 

257 0OnU6 

258 0OC15O 

259 000152 

260 0001 5A 

261 000156 

262 000160 
63 



7^ 

273 000162 
271^ 000164 

275 000 i*6 

276 000170 

277 000172 



020003 
103373 
010310 
0100A6 
060116 



50$: 



2A8 0OOU2 020326 



001002 
0123i0 
061301 
Oi 0(^46 
010022 
061216 
020026 



55$: 



60$: 



65$: 



001003 
061201 
011042 
010200 
010160 000002 



70$: 



000176 



80$: 



CMP 

BHIS 

MOV 

MOV 

ADD 

.IFT 

BCS 
CMP 
BNE 
CMP 
BLO 
CMP 
BHI 



.IFTF 

CMP 

.IFT 

BLO 

.IFTF 

BNE 
MOV 
ADD 
MOV 
MOV 
ADD 
CMP 

.IFT 

LHIS 

TMP 

BEQ 

.IFTF 

BNE 
ADD 

MOV 
MOV 
MOV 

.IFT 

TST 

.IFTF 

RETURN 



R0,R3 

40$ 

R3,(R0) 

RO,-(SP) 

RI.(SP) 



100$ 

2(SP),/I'$CRAVL 

55$ 

R0,#$POOL 

100$ 

(SP),$EXSIZ 

100$ 



R3.(SP)+ 



90$ 



60$ 

(R3)*,(R0) 

(R3).R1 

R2.-(SP) 

R0.(R2)* 

(R2).(SP) 

RO.(SP)* 



65$ 

{SP).#$CRAVL 

100$ 



70$ 

(R2).R1 

(R0).-(R2) 

R2,R0 

R1,2(R0) 



{%?)* 



BLOCK GO HERE? 

IF HIS NO 

ASSUME NO AGLOMERATION 

CALCULATE ADDRESS OF NEW BLOCK 



IF CS ILLEGAL DEALLOCATION 

DEALLOCATION IN EXECUTIVE POOL? 

IF NE NO 

DEALLOCATION BEFORE FRONT OF LIST? 

IF LO YES 

DEALLOCATION PAST END OF POOL? 

IF HI YES 

REFERENCE LABEL 



; EQUAL TO NEXT IN CHAIN? 



;IF LO, DEALLOCATION OVERLAPS 



IF NE NO 

MOVE LINK WORD TO 0* OCK RELEASED 

MERGE TWO BLOCKS 

SAVE ADDRESS OF PREVIOUS BLOCK 

ASSUME NO AGLOMERATION 

CALCULATE ADDRESS OF NEXT BLOCK 

EQUAL TO BLOCK BEING RELEASED? 



IF HIS. NO OVERLAP 

DEALLOCATION IN Fai:CUTIVE CORE POOL? 
IF EQ YES (ELSE ^f SUf3E OF OVERLAP) 
REF LABEL 



;IF NE NO 

.-MERGE TWO BLOCKS 

;MOVE LINK WORD TO PREVIOUS BLC 

;SET NEW ADDRESS OF BLOCK 

;SET SIZE OF BLOCK RELEASE"" 



;POP ADDRESS OF LISTHEAD 



*•*• C 10 **** 



CORAL MACRO Ml 108 H-DEC-77 20:01 PAGE 2-5 



286 
287 
288 
289 
290 
291 
292 
293 
294 
295 
296 
297 
298 



.IFT 



90$: 


T3T 


R3 




BEQ 


60$ 


100$: 


CRASH 





.•INSERT AT END OF LIST? 

;IF lQ YES, OK 

; CRASH SYSTEM, BAD CORE DEALLOCATION 



000001 



.ENDC 

.DSABL LSB 
.END 



•••• p ^0 **•* 



CORAL MACRO MHOS 
SYMBOL TABLE 



1A-0EC-77 20:01 PAGE 2-6 



A. AST 

A.BYT 

A.CBL 

A.DQSR 

A.KSR5 

A.NPft 

A.PRM 

CtSORE- 

C.AR5 

CAST 

C.CSTP= 

COST 

CEFN 

CLGTH= 

CLNK 

. ABS. 



000006 
OOOOOA 
000002 
177776 
17777A 
000010 
000012 
OOOAOO 
OOOOU 
000012 
000012 
000016 
000003 
000020 
000000 



177776 
000200 
ERRORS DETECTED: 



000 
001 







CMRKT= 

CRQT 

CRSI 

CSCHD= 

CSRC 

CSSHT= 

CSUB 

CSYST= 

CSYTK= 

CTCB 

CTIM 

CUIC 

D.RS1 = 

H»$RTZ= 

LAST 



000000 

000002 

000012 

000002 

OOOOU 

000004 

000012 

000006 

000010 

OOOOOA 

000006 

000016 

****** GX 

00007A 

000022 



I.ATTL= 

I.EFN 

I.FCN 

I.IOSB 

I.L6TH= 

I.LNK 

I.LN2 

I.PRI 

I.PRM 

I.TCB 

I.UCB 

KSSCNTs 

KSSCSR= 

KS$IEN= 

KS$LDC= 



0000A4 
000003 
000012 
OOOOU 
0000A4 
000000 
000006 
000002 
00002A 
OOOOOA 
000010 
177546 
177546 
000115 
000001 



K»$TPS= 
M$SCRB= 

RSSFII:: 

RSSJP0= 
R$$JP1= 
R$$JS1= 
RStKl1= 
R»$P11= 
R$SX11= 
R$$11M= 
R$$11S= 
S»$ECC= 
S$$YSZ= 
T»fA11= 



000074 
000124 
000001 
000000 
000001 
000001 
000001 
000001 
000001 
000000 
000000 
000000 
001000 
000001 



T$$C11= 

T«J16= 

T$S»(MG= 

T$$«11= 

V$$CTR= 

SALCLK 

SALOCB 

SAL0C1 

SALPKT 

$CRAVL= 

SDEACB 

SDEACI 

SDECLK 

SDEPKT 



000001 

000001 

000000 

000001 

000400 

000054RG 

OOOOOORG 

000004RG 

000070RG 

****** Gx 

00011 ORG 
0001 URG 
000062RG 
0001 04RG 



VIRTUAL MEMORY USED: 1942 WORDS ( 8 PAGES) 
DYMAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:13 
C41,2OKORAL.SY0:C41.30KORAL/-SP=C1.13EXEMC/ML.C41,10]RSXMCC11.10]CORAL 



•*•• E 10 **** 




*••• f 10 *••• 



CRASH MACRO Hi 108 U-OEC-77 20:02 PAGE 2 



10 
11 
12 
13 
K 
15 
16 
17 
IB 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 

?! 

54 
55 
56 
57 



.TITLE CRASH 
.IDEMT /04/ 



COPYRIGHT (C) 1977 

DIGITAL EQUIPMENT CORPORATION, NAVNARD. MASS. 



THIS SOFTUARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A 
SINGLE COMPUTER SYSTEM AND NAY BE COPIED ONLY WITH THE INCLUSION 
OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE, OR ANY OTHER 
COPIES THEREOF , MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE 
TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE 
WHO AGREES TO THESE LICENSE TERNS. TITLE TO AND OWNERSHIP OF 
THE SOFTWARE SHALL AT ALL TINES REMAIN IN DIGITAL. 

THE INFORfMTION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DIGITAL ASSUMES NO RESPONSIBTLITV FOR THE USE OR RELIABILITY OF 
ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. 



VERSION 04 

J. MASSE / P. J. BEZEREDI 24-0CT-77 

CRASH DUMP ROUTINES 

.IF DF CSSRSH 

MACRO LIBRARY CALLS 

.MCALL HWDDFS 
HWDDFS 

LOCAL DATA 



iCRUPC::.WORD 
ICRUSr::.WORD 

.IF DF CttCDA 



USER PC IS STORED HERE 
USER PS IS STORED HERE 



CRSMSG: .ASCII <15><12><12>/CRASH — CONT WITH SCRATCH MEDIA ON / 

.IIF EQ CttCDA-1. .ASCII /DT/ 
.IIF EO CllCDA-2. .ASCII /DK/ 
.IIF EQ CltCDA-3. .ASCII /NT/ 



•••• G }Q •••• 






CRASH HACRO mi08 U-DEC-77 20:02 PAGE 2-1 



58 

59 

60 

61 

62 

63 

64 

65 

66 

67 

68 

69 

70 

71 

72 

73 

74 

75 

76 

77 

76 

79 

80 

81 

82 

83 

84 

85 

86 

87 

88 

89 

90 

91 

92 

93 

94 

95 

96 

97 

98 

99 

100 

101 

102 

103 

104 

105 

106 

W7 

108 

109 

110 

111 

113 
114 



.IIF 


EQ C$$CDA-4. .ASCII /m/ 


UNIT 


•ASCIZ 
.EVEN 

.ENDC 


/0/<15><12><12> 




.IF OF 


C»$TTY 


MSG1 


.ASCIZ 


<15><12><12>/SYSTE« CRASH AT LOCATION / 


MSG2 


.ASCII 


<15><|2><12>/REGISTERS/<15><12><12> 




.ASCIZ 


/ R0=/ 


MSG3 


.ASCIZ 


/R1=/ 


MSG4 


.ASCIZ 


/R2=/ 


MSG5 


.ASCIZ 


/R3=/ 


MS66 


.ASCIZ 


<15><12><12>/ R4=/ 


NS67 


.ASCIZ 


/R5=/ 


MSG8 


.ASCIZ 


/SP=/ 


MSG9 


.ASCIZ 


/PS=/<0> 


nSGIO: .ASCII 


<15><12><12>/SY5tTE« STACK DUMP/ 




.ASCIZ 


<15><12><12>/ LOCATION C0NTENTS/<15><12><12> 




.EVEN 





tCRPBF 
SCRSBF 
SCRPST 



.ENDC 



.BLKU 
.BLKW 



4 

14. 



.IF DF MSSfKE 
.8I.KW 159. 
.ENDC 



ICRSST".-2 



.IF DF CtSCDA 



ICRSBN::.W0RD 
SCRSCS::.WOftD 



LOCAL MACROS 



PBNHtPSNL 



; ♦•• THE FOLLOWING MUST BE ADJACENT 
.•STACK WfA FOR SUBROUTINE CALLS 
.•INTERNAL CRASH STACK ... 
;TOP OF PANIC STACK 



;... MAPPED STACK IS THIS LARGE 



.-TOP OF CRASH STACK 

; •** ABOVE MUST BE ADJACENT 



.•STARTING DEVICE ADDRESS 
;CHECKSUM OF DEVICE ADDRESS 



y^ 



.MACRO PUSH 

SUB «2.SP 

MOV ARG.(SP) 

.ENDM PUSH 



ARG 



**** N 10 **** 



»AA*L. MA^AA M4 4I\A 



li^-Ker-vy on.n? 



iAr.c 1-9 



CRASH MACRO MHOS U-DEC-77 20:02 PAGE 2-2 



115 

116 

117 

118 

119 

120 

121 

122 

123 

12<. 

125 

126 

127 

128 

129 

130 

131 

132 

133 

134 

135 

136 

137 

138 

139 

UO 

U1 

^^,^ 

U3 

U4 

H5 

U6 

^t,7 

U8 

U9 000000 

150 

151 

152 

153 

15* 

155 

156 

157 

158 

159 

160 

161 

162 

163 

164 

165 

166 

167 

168 

169 

170 

171 



.ENDC 



.ENOC 



••-»CRASH-SySTE« CRASH DUMP ROUTINE 

THIS ROUTINE IS ENTERED VIA A JUMP WHENEVER A FATAL SYSTEM ERROR 
(lOT) IS DETECTED. 

THIS ROUTINE PERFORMS A MEMORY DUMP THAT CAN BE DIRECTED TO A 
HARD COPY DEVICE. DECTAPE. RK05, TU10 OR rU16. THE DUMP GENERATED 
WILL HAVE A SPECIAL BLOCK AS THE FIRST BLOCK OF THE DUMP, WHICH WILL 
CONTAIN INFORMATION CONCERNING THE STATE OF THE SYSTEM AT THE TIME 
THE CRASH OCCURRED. ONCE THE DUMP IS FINSIHED THE SYSTEM MAY BE 
RE-SOOTED OR ANOTHER DUMP MAY BE TAKEN. IF THE DUMP IS DIRECTED 
TO A HARD COPY DEVICE THE DUMP WILL CONTAIN ONLY THE REGISTER 
CONTENTS AND THE SYSTEM STACK. 



INPUTS: 



02{SP)=PS WORD AT CRASH. 
00(SP)=PC WORD AT CRASH. 



OUTPUTS: 



; 
; 
; 

tCRASH: 



THE INTERNAL CRASH STACK AND A CORE IMAGE OF THE SYSTEM. 
UP TO 128K. ARE DUMPED ONTO THE MASS STORAGE CRASH DUMP DEVICE. 
THE REGISTER CONTENTS AND THE SYSTEM STACK ARE DUMPED IF A 
HARD COPY DUMP IS REQUESTED. 



.IF DF CSSRSH 



ICRALT: 



MOV 
MOV 



(SP)».»CRUPC 
(SP)».SCRUST 



.•CRASH DUMP ROUTINE 



SAVE USER PC FROM THE STACK 
SAVE USER PS FROM THE STACK 



.IF DF CMTTY 



(SP)*.$CRPBF 

R0.ICRPBF»2 

»$CRPBFt4.R0 

RI.(RO)* 

R2.(R0)« 

R3.(RQ}« 

R4.(R0)« 

R5.(R0)t 

(SP)*.2<R0) 

SP.(R6) 



SAVE LOCATION OF CRASH 
SAVE RO 

SET UP SAVE AREA 
SAVE R1 THRU R5 



SAVE PS 
SAVE SP 



•••• I 10 **** 



CRASH MACRO MHOS U-OEC-77 20:02 PAGE 2-3 



172 
173 
17A 
175 
176 
177 
178 
179 
180 
181 
182 
183 
18A 
185 
186 
187 
188 
189 
190 
191 
192 
193 
194 
195 
196 
197 
198 
199 
200 
201 
202 
203 
204 
205 
206 
207 
208 
209 
210 
211 
212 
213 
2}i> 
215 
216 
217 
218 
219 
220 
221 
222 
223 
22i* 
225 
226 
22? 
226 





•5V 


#$CRPST.SP 




Iv 


#C$$TTV.R5 




MOV 


MCRPBF.R1 




MOV 


«MSG1 .R4 


IS: 


MOVB 


(RA)t.R2 




KO 


5$ 




W 


St 


2$: 


Move 


(RA)«,R2 




BEQ 


AS 


31: 


CALL 


SOUT 




BR 


2S 


Al: 


MOV 


(R1)t,R3 




CALL 


SEDIT 




BR 


IS 


5$: 


MOVB 


(RA)*.R2 




BEQ 


6S 




CALL 


SOUT 




BR 


5S 


6$: 


MOV 


SCRPBFt16.R1 


7$: 


MOV 


R1.R3 




CALL 


8S 




NOV 


(R1)».R3 




8K 


8S 




SCRLF 




CMP 


R1 ,«SSTACK 






7S 

/rSCRPeF«16.R0 

(RO),SP 

-(R0),R5 

-(RO).RA 

-(R0).R3 

-{R0-.R2 

-{RO.RI 

-{RO).R0 




BR 


9S 


8t: 


CALL 


SOUTB 




CALL 


SOUTB 




CALLR 


SEDIT 


9S: 


.ENDC 






.IF DF 


CSSCDA 




R 


#6. MA 

«2.a#6 




.IF DF 


Lsssn 




MTM 


SCRSST 
SCRSST 

#PR7 



SETUP TEMPORARY STACK 

SPECIFY OUTPUT DEVICE CSR 

POINT TO DATA VECTOR 

POINT TO MESSAGE TEXT 

GET A BYTE OF MESSAGE 

IF EQ AT MESSAGE BREAK 

ELSE ALREADY HAVE A BYTE 

GET A BYTE OF MESSAGE 

IF EQ END OF THIS MESSAGE 

OUTPUT THIS CHARACTER 

GO AGAIN 

GET DATA WORD 

PRINT IN PLACE 

GET NEXT MESSAGE 

GET NEXT CHARACTER TO OUTPUT 

IF EQ END OF STRING 

OUTPUT CHARACTER 

GO AGAIN 

POINT TO BOTTOM OF SYSTEM STACK 

SET ADDRESS OF LOCATION TO EDIT 

EDIT ADDRESS 

GET CONTENTS OF LOCATION 

EDIT CONTENTS 

ISSUE CARRIAGE RETURN. LINE FEED 

END OF SYSTEM STACK? 

IF LO NO 

POINT TO SAVED STACK POINTER 

RESTORE SP 

RESTORE R5 THRU RO 



BR AROUND SUBROUTINE 
OUTPUT TWO BLANKS 

PRINT CONTENTS OF R3 AND RETURN 
REF LABEL 



.•SETUP TO IGNORE NON-EXISTANT MEMORY 
.-PUT RTl INSTRUCTION IN LOCATION 6 



.•CLEAR PS STORAGE WORD 
; STORE LOW BYTE OF PS 
;LOCK OUT INTERRUPTS 



.IM 



••** J 10 **** 



I »&**u 



^A^a%rt. Ml 1 Aft 



4Z.ncr-77 ^A.A3 BAre )-^ 



CRASH MACRO MHOS U-OEC-77 20:02 PAGE 2-4 



229 
230 
231 
232 
233 
234 
235 
236 
237 
238 
239 
2A0 
2A1 
242 
243 
244 
245 
246 
247 
248 
249 
250 
251 
252 
253 
254 
255 
256 
257 
258 
259 
260 
261 
262 
263 
264 
265 
266 
267 
268 
269 
270 
271 
272 
271 
271, 
275 
276 
277 
278 
279 
280 
281 
282 
283 
284 
285 



10$: 



20S: 



30$: 



NOV 

novB 

.ENOC 



MOV 
NOV 

nov 

MOV 



PS,$CRSST .-STORE FULL PS 
#PR7.PS .-LOCK OUT INTERRUPTS 



.ENDC 



SP.$CRSST-2 
»CRUPC.$CRSST-4 
$CRUST.$CRSST-6 
#fCRSST-6,SP 



SAVE SP 

SAVE PC BEFORE lOT CRASH 
SAVE PS BEFORE lOT CRASH 
RESET SP TO INTERNAL STACK 



.IF DF 


MtSMGE 


MFPI 


SP 


.IFF 




CLR 


-(SP) 


.IFTF 




MOV 


RO.-(SP) 


MOV 


RI.-(SP) 


MOV 


R2.-(SP) 


MOV 


R3.-(SP) 


MOV 


R4.-(SP) 


MOV 


R5.-(SP) 


.IFT 




PUSH 


SRO 


PUSH 


SR0»2 


PUSH 


SR0*4 


PUSH 


SR3 


BIC 


#67,SR3 


MOV 


«UISDR0,R0 


MOV 


#32.. R1 


PUSH 


(RO) 


ADD 


#2.R0 


DEC 


R1 


BNE 


10S 


MOV 


/PSISDRO.RO 


MOV 


#64., R1 


PUSH 


(RO) 


ADD 


#2.R0 


DEC 


R1 


BNE 


201 


MOV 


#UBMPR.R0 
#62.. R1 


MOV 


PUSH 


(RO) 


ADD 


#2.R0 


DEC 


R1 


BNE 


SOS 



;;;SAVE USER'S SP 



;;;N0 USER SP IF "INMAPPED 



SAVE REGISTER SET 1 



SAVE MEMOR"" MANAGEMENT REGISTERS 



DISABLE UNIBUS MAP AND D-SPACE 
SETUP TO SAVE FIRST SET OF APR'S 

SAVE APR 

MOVE TO NEXT ONE 

DONE YET? 

IF NE NO 

SETUP TO SAVE SECOND SET OF APR'S 

SAVE APR 

MOVE TO NEXT ONE 

DONE YET? 

IF NE NO 

GET ADDRESS OF FIRST UMR 

NUMBER OF UMR'S TO SAVE 

SAVE A UMR 

MOVE TO NEXT ONE 

DONE YET? 

IF NE NO 



**** K 10 **•• 



rb*eu UArnn Mima 1/..ntr.77 Sn-H) OkCf ?-< 



CRASH MACRO Ml 108 U-DEC-77 20:02 PAGE 2-5 



TYPE MESSAGE AND WAIT FOR USER 



AGAIN: MOV 
ADD 
MOVB 
MOV 
MOV 
MOVB 
BEQ 
CALL 
BR 

»CRSHT::HALT 
BR 



10$: 



SCRSUN.RO 

#'0.R0 

RO.UNIT 

«CRSMSG.R1 

#CSSRSH,R5 

(R1)*.R2 

SCRSHT 

SOUT 

10$ 

DUMP 



GET CRASH UNIT NUMBER 

ADD ASCII BIAS 

HOVE IT INTO TEXT STRING 

TYPE USER MESSAGE 

GET CSR ADDRESS OF PRINT DEVICE 

GET CHARACTER 

IF EQ MESSAGE PRINTED 

OUTPUT THE CHARACTER 

LOOP FOR MORE 

WAIT FOR THE USER 

GO DO THE DUMP 



FOR CONVENIENCE THE CRASH DEVICE UNIT NUMBER IS STORED 
HERE SO THAT THE CONSOLE DISPLAY *2 WILL GIVE THE 
ADDRESS OF THE NEXT WORD, THUS ALLOWING THE USER TO PATCH 
A DIFFERENT UNIT NUMBER (IGNORING THE PRINTOUT). 



$CRSUN::.WORD C$$RUN 



;;; CRASH UNIT NUMBER (DEFAULT=0) 



316 
317 
318 
319 
320 
321 
322 
323 
324 
325 

330 
331 



♦*-C»(SUM-VERIFY CHECKSUM OF DEVICE ADDRESS 

THIS ROUTINE WILL VERIFY THAT THE DEVICE ADDRESS FOR THE RK11 
AND TC11 HAS NOT BEEN CORRUPTED BY THE CRASH. 



CKSUM: 


MOV 


$CRSBN.-(SP) ;; 


GET HIGH ORDER BITS 




ADP 


$CRSBN*2.(SP) ;: 


ADD LOW ORDER BITS 




CMP 


(SP)*.$CRSCS ;; 


COMPARE WITH CHECKSUM 




BEQ 


10$ ;; 


IF EQ OK 




HALT 




WAIT FOR USER 




BR 


CKSUM ; ; 


TRY AGAIN 


10$: 


RETURN 


n 


1 



♦•-DUMP-DUMP THE SYSTEM IMAGE 

THIS ROUTINE IS USED TO DUMP THE INTERNAL CRASH STACK 
AND THE SYSTEM IMAGE ONTO A SCTATCH DUMP MEDIA. WHEN THE DUMP 
IS FINISHED THE SYSTEM IS EITHER RE-BOOTED OR THE USER IS ASKED 
IF HE WANTS TO DUMP ANOTHER COPY OF THE IMAGE. 

INPUTS: 



N0^:£. 

OUTUTS: 

IMAGE DUMPED. 



**** L 10 **** 



kAL« ft«*#>Mn M4 1AB 



li-r^rr-T-f ^n.r\9 DArC ^-.1. 



CRASH MACRO Ml 108 U-DEC-77 20:02 PAGE 2-6 

DUMP: 



PBNH= 
PBNL= 



10S: 
20$: 
30$: 



AOS: 



50$: 



PflNH= 
P8NL = 



MOV 
MOV 




100 

CALL 

SWAB 

MOV 

BIS 

MOV 

BIT 

BEQ 

BPL 

MOV 

BIS 

MOV 

BIT 

8MI 

BEQ 

SUB 

BNE 

MOV 

MOV 

MOV 

BIS 

MOV 

BIT 

BEQ 

BMI 

CLR 

CLR 

MOV 

BIS 

MOV 

CLR 

TST 

BPL 

BIT 

BEQ 

BIS 

MOV 

.ENDC 




12« 

CALL 
CLC 



#C$$CSR.RO 
$CRSUN,R3 



.IF EQ C$$CDA-1 



CKSUM 

R3 

R3.R1 

«4003,R1 

RI.(RO) 

«1 00200, (RO) 

10$ 

DUMP 

R3.R1 

#3.R1 

R1,(R0} 

«100200.(RO) 

DUMP 

50$ 

$CRSBN*2.6(R0) 

20$ 

#-256..2{R0) 

«$CRSBF,4(R0) 

R3,R1 

#15. R1 

RI.(RO) 

#100200, (RO) 

40$ 

DUMP 

2(R0) 

A(R0) 

R3.R1 

#15. Rl 

R1,(R0) 

2(R0) 

(RO) 

50$ 

#400, -2 (RO? 

DUMP 

#1.R3 

R3,(R0) 



.IF EQ C$$CDA-2 



CKSUM 



DUMP IMAGE ONTO MEDIA 

GET CSR ADDRESS OF DUMP DEVICE 

GET UNIT NUMBER 



;HIGH ORDER TC11 BLOCK NUMBER 
;LOW ORDER TC11 BLOCK »KJMBER 



CHECK BLOCK NUMBER AGAINST CHECKSUM 

POSITION UNIT BITS 

COPY 

SET FOR READ LBN IN REVERSE 

START THE TAPE 

ERROR OR READY? 

IF EQ NO 

IF PL MOVE UNTIL ENDZONE 

RETREIVE UNIT BITS 

SET TO READ LBN FORWARD 

START THE TAPE 

ERROR OR READY? 

IF MI ERROR, RESTART 

IF EQ WAIT 

ARE WE AT THE BLOCK WE WANT? 

IF NE NO 

WORD COUNT FOR INTERNAL STACK 

SET INTERNAL STACK ADDRESS 

RETREIVE UNIT BITS 

SET TO WRITE DATA FORWARD 

WRITE THE BLOCK 

ERROR OR READY? 

IF EQ NO 

IF MI ERROR, RESTART 

SET TO WRITE ALL MEMORY 

RETREIVE UNIT BITS 

SET TO WRITE DATA FORWARD 

WRITE ALL MEMORY 

KEEP WRITING 

ANY ERRORS? 

IF PL NO 

NON-EXISTANT MEMORY? 

IF EQ NO, RESTART 

SET TO STOP TAPE 

STOP TAPE 



.-HIGH PART OF RK11 DISK ADDRESS 
; LOW PART OF RK11 DISK ADDRESS 

;j;CHECK DISK ADDRESS AGAINST CHECKSUM 
;;;SET TO POSITION UNIT BITS 



•*** n 10 **** 



rb4«u MAran Ml in* u.npr>77 PO'O? PAGF P-7 



CRASH MACRO M1108 U-DEC-77 20:02 PAGE 2-7 



10$: 



20S: 



PBNH= 
FBNL = 



10$: 



20$: 



30$: 
35$: 



40$: 



ROR 


R3 ;: 




ROR 


R3 :: 




ROR 


R3 :: 




ROR 


R3 ;; 




MOV 


#401. (RO) ;; 


RESET RK11 CONTROLLER 


BIS 


$CRSBN^2.R3 


SET STARTING DISK ADDRESS 


MOV 


R3.6(R0) ;; 


SET DISK ADDRESS 


MOV 


«$CRSBF.4(R0) :: 


•SET ADDRESS OF INTERNAL STACK 


MOV 


#-256..2(R0) ;; 


;SET TO WRITE ONE BLOCK 


MOV 


#403, (RO) ;; 


; WRITE THE FIRST BLOCK 


BIT 


#100200. (RO) ;; 


; ERROR OR READY? 


BEQ 


10$ ;; 


■IF EQ NO 


BMI 


DUMP 


;IF Ml ERROR. RESTART 


CLR 


4(R0) ;; 


; SETUP TO WRITE ALL MEMORY 


CLR 


2(R0) ;; 




MOV 


#403. (RO) ;; 


•START THE WRITE 


CLR 


2(R0) ;; 


IKEEP WRITING 


TST 


(RO) ; ; 


lANY ERROR BITS SET? 


BPL 


20$ ;; 


•IF PL NO 


BIT 


#2000.-2 (RO) ;; 


;NON-EXISTANT MEMORY? 


BEQ 


DUMP 


;IF EQ NO. RESTART 



.ENDC 



.IF EQ C$$CDA-3 




SWAB R3 

BIS #60001 .R3 

MOV R3.12 

BIS #16. R2 

MOV R2,(R0) 

BIT #100200. (RO) 

BMI DUMP 

BEQ 10$ 

MOV #$CRSBF.4(R0) 

MOV R3,R2 

BIS #4.R2 

MOV #-512..2(R0) 

MOV R2,(R0) 

BIT #100200 (RO) 

BMI DUMP 

BEQ 20$ 

CLR (RO) 

CLR 4(R0) 

BIC #1.R2 

MOV R2.(R0) 

MOV #-500, R1 

DEC R1 

BNE 35$ 

MOV #-512..2(R0) 

BIS #r(R0/ 

BIT #160200. (RO) 

BEQ 40$ 



BLOCK NUMBER IGNORED FOR TM11 



POSITION UNIT SELECT BITS 

MERGE DENSITY AND GO ^ITS 

COPY 

SET REWIND FUNCTION 

START THE REWIND 

ERROR OR READY? 

IF MI ERROR. RESTART 

IF EQ NO 

SET ADDRESS OF INTERNAL STACK 

RETREIVE MTC BITS 

SET WRITE DATA FUNCTION 

SET 512. BYTE RECORD 

START THE WRITE 

ERROR OR READY? 

IF MI ERROR. RESTART 

Ir EQ NO 

CLEAR MTC REGISTER 

START TO WRITE ALL MEMORY 

CLEAR GO BIT 

LOAD MTC REGISTER 

WAIT FOR TAPE TO SETTLE DOWN 

WAIT 

IF NE LOOP 

SET 512. BYTE RECORDS 

START THE WRITE 

ERROR OR READY? 

IF EQ NO 



•*•* M 10 **** 



CRASH MACRO M1108 H-OEC-77 20:02 PAGE 2-8 



A57 
A58 
A59 
A60 
A61 
A62 
A63 
AM 
A65 
A66 
A67 
A68 
A69 
A70 
A71 
A72 
A73 
A7A 
A75 
A76 
A77 
A78 
A79 
A80 
AS1 
A82 
A83 
ABA 
A85 
A86 
A87 
A88 
A89 
A90 
A91 
A92 
A93 
A9A 
A95 
A96 
A97 
A98 
A99 
500 
501 
502 
503 
50A 
505 
506 
507 
508 
509 
510 



50S: 



60$: 



BPL 

TSTB 

BPL 

NOV 

BIS 

NOV 

TSTB 

BPL 

BIS 

NOV 

TSTB 

BPL 

CLR 

.ENOC 



30$ 

-2(R0) 

DUMP 

R3.R2 

«l6000,R2 

R2.(R0) 

(RO) 

50$ 

<r6,R3 

R3.(R0) 

(RO) 

60$ 

(RO) 



.IF EQ C$$CDA-A 



PBNHs 
PBNLr 








BIS 

$DNSTY::.WORD 
BIS 



10$: 



20$: 



30$: 



A0$: 



50$: 



60$: 



70$: 



TSTB 

BPL 

MOV 

NOV 

BIT 

BNE 

TSTB 

BPL 

NOV 

NOV 

NOV 

NOV 

TSTB 

BPL 

BIT 

BNE 

CLR 

NOV 

NOV 

BIS 

TSTB 

BPL 

BIT 

BEQ 

BIT 

BEQ 

BIS 

TSTB 

BPL 

NOV 

NOV 

TSTB 



(PC)*.R3 

1300 

IVA0,10(R0) 

12(R0) 

10$ 

R3,32(R0) 

#7,(R0) 

#20000, 12(R0) 

20$ 

12(R0) 

20$ 

»$CRSaF.A(R0) 

/»-256..2(R0) 

#-512..6(R0) 

*61 , (RO) 

12(R0) 

30$ 

«A0000.(R0) 

DUNP 

A(R0) 

#-256.,2(R0) 

#-512.,6(R0) 

«1.(R0) 

12(R0) 

50$ 

«A0000,(R0) 

A0$ 

#A000,10(R0) 

DUNP 

«A0.10(RO) 

12(R0) 

60$ 

r!.32(R0) 

#2^(R0) 

12(R0) 



IF PL WRITE FINISHED 

NON-EXISTANT NEMORV? 

IF PL NO, RESTART 

RETREIVE MTC BITS 

SET CLEAR FUNCTION 

LOAD FUNCTION 

READY? 

IF PL NO 

SET yRITE EOF FUNCTION 

DO THE WRITE EOF 

READY? 

IF PL NO 

CLEAR MTC REGISTER 



BLOCK NUMBER IGNORED FOR TJU16 



SET MODE AND DENSITY 

DEFAULT TO 800 BPI, NORMAL UDE 

RESET CONTROLLER 

IS THE TAPE DRIVE READY? 

IF PL NO 

SET FORMAT BITS 

START THE TAPE REWINDING 

POSITIONING STILL IN PROGRESS? 

IF NE YES 

DRIVE READY? 

IF PL NO 

SET ADDRESS OF INTERNAL STACK 

SET WORD COUNT 

SET FRAME COUNT 

START THE WRITE 

DRIVE READY? 

IF PL NO 

TRANSFER ERROR? 

IF NE YES, RESTART 

SET TO WRITE ALL OF MEMORY 

SET WORD COUNT 

SET FRAME COUNT 

START TO WRITE ALL OF MEMORY 

DRIVE READY? 

IF PL NO 

TRANSFER ERRORS? 

IF EQ NO 

NON-EXISTANT MENORY? 

IF EQ NO 

RESET CONTROLLER 

DRIVE READY? 

IF PL NO 

RESET FORMAT BITS 

WRITE EOF ON TAPE 

IS DRIVE READY? 



•••* B \\ **t* 



CRASH MACRO M1108 U-DEC-77 20:02 PAGE 2-9 



52A 000000 000167 0000006 
525 



M 
536 

537 OOOOOA 



BPL 
CLR 


70$ 
(RO) 


.ENDC 




.ENDC 




.IFF 




JMP 


SPANK 



.ENDC 



;;;IF PL NO 

;;;CLEAR CONTROLLER REGISTER 



;;;JU«P TO PANIC DUMP ROUTINE 



IF BSSOOT IS DEFINED, RE-BOOT THE SYSTEM BY JUMPING TO THE 
BOOTSTRAP ROM ADDRESS SPECIFIED BY B$$OOT. ELSE. RE-ISSUE 
THE CRASH MESSAGE IF THE USER WISHES ANOTHER DUMP. IF NO 
CRASH DUMP WAS CONFIGURED, SIMPLY RE-BOOT OR HALT FOREVER. 



SBTSTP: 



;;; RE-BOOT THE SYSTEM 



A6 

5A7 

5A8 OOOOOA 000000 

SA9 

550 



21 
562 

563 000006 000776 
56A 



.IF DF 


BSSOOT 


HALT 

RESET 

JMP 


a«6SSoor 


.IFF 




HALT 




.IF DF 


CSSRSH 


.IF DF 


C$$CDA 


JMP 


AGAIN 


.ENDC 




.IFF 




BR 


.-2 


.ENDC 





;:WAIT FOR THE USER BEFORE BOOTING 
;;RESET THE WORLD 
RE-BOOT THE SYSTEM 



;;;WAIT FOR THE USER 



;;;D0 IT ALL OVER AGAIN 



;;;LOOP FOREVER 



.ENDC 



••** c 11 *•** 



CRASH MACRO Ml 108 1A-DEC-77 20:02 PAGE 2-10 

571 000001 .END 



•••* \y t*t* 



CRASH MACRO Ml 108 U-DEC-77 20:02 PAGE 2-11 
SYMBOL TABLE 



K»$TPS= 00007A 
MS$CRB= 0001 2A 
RSSF11: 000001 
R$SJPO= 000000 
Rt$JP1= 000001 
R»$JS1= 000001 



R$$K11= 000001 
RS$P11= 000001 
R$$X11= 000001 
R$$11M= 000000 
R$$11S= 000000 
SSSECC^ 000000 



CS$ORE= OOOAOO 
H$$RTZ= 00007A 
K$»CNT= 1775A6 
K»$CSR= 1775A6 
KUIEN= 000115 
KtSLDC^ 000001 

. ABS. 000000 000 
000010 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 1135 WORDS ( 5 PAGES) 
DYNAMIC MEMORY: 157A4 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:13 

W1,203CRASH.SYO:CA1.30:cRASH/-SP=C1.13EXEMC/ML.C41.10:RSXMC.C11JO]CRASH 
B 



SSSYSZ= 001000 
T$$A11= 000001 
T$$C11= 000001 
T$$J16= 000001 
TSSKMG= 000000 



T$$M11= 000001 
V«CTR= 000-400 
SBTSTP O0O0OAR6 
SCRASH 000000R6 
$P^>IIC= •*»*♦* 6X 



ft*** E 11 **** 




•••• f ]} *••* 



CVRTM MACRO Ml 108 U-DEC-77 20:02 PAGE 2 
1 



4 
5 



i 

1! 
U 
1 
1 



41 000000 

42 000002 

43 000004 

44 000006 

45 000010 

46 000014 

47 000016 

48 000020 

49 000022 

50 000024 

51 000026 

52 000030 

53 000034 

54 000040 

55 000042 

56 000044 

57 000050 



012301 

100444 

012300 

005300 

020027 000003 

101037 

006300 

060007 

000427 

000422 

000406 

012700 000074 

005700 

001024 

020127 002640 

101021 



.TITLE CVRTM 
.IDENT /02/ 



COPYRIGHT (C) 1974. 1976 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 02 

D. N. CUTLER 12-AU6-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 

MODIFIED BY: 

♦*-SCVRTM-CONVERT TIME 

THIS ROUTINE IS CALLED TO CONVERT A TIME INTERVAL-TIME UNITS PAIH 
TO A CLOCK TICKS COUNT. 

INPUTS: 

R3=ADDRESS OF TIME INTERVAL-TIME UNITS PAIR. 

OUTPUTS: 



; 
t 
i 
t 
i 
t 
;- 



IF AN ILLEGAL TIME INTERVAL (GREATER THAN 15 BITS) OR 
ILLEGAL TIME UNITS (ZERO OR GREATER THAN 4) IS SPECIFIED, 
THEN A DIRECTIVE STATUS OF 'D.RS93* IS RETURNED. ELSE THE 
TICKS COUNT IS RETURNED WITH THE HIGH ORDER PART IN RO AND 
THE LOW ORDER PART IN R1 . R3 IS ADVANCED BY 4 THUS POINTING 
PAST THE TIME INTERVAL-TIME UNITS PAIR. 



$CVRTM::MOV 
BMI 
MOV 
DEC 
CMP 
BHI 
ASL 
ADD 
BR 
BR 
BR 
MOV 
CALL 
TST 
BNE 
CMP 
BHI 



lot: 



20t: 



(R3)t,R1 

70$ 

(R3)*.R0 

RO 

R0.*3 

70l 

RO 

RO.PC 

50i 

30$ 

20$ 

#60. .RO 

$MUL 

RO 

70$ 

R1./»1440. 

70$ 



GET TIME INTERVAL 

IF MI ILLEGAL TIME INTERVAL 

GET TIME UNITS 

BACK OFF BY ONE 

LEGAL UNITS? 

IF HI NO 

CONVERT TO DISPATCH INDEX 

DISPATCH 

1»T1CKS 

2-SECONDS 

3«MINUTES 

4=H0URS 

CALCULATE NUMBER OF MINUTES 

OVERFLOW 16 BITS? 

IF NE YES 

MORE THAN ONE DAY OF MINUTES? 

IF HI YES 



•••ft Q 11 •••• 



CVRTW MACRO mi08 U-DEC-77 20:02 PAGE 2-1 



58 000052 

59 000056 

60 000062 

61 000066 

62 000070 

63 000072 
(A 000076 

65 000102 

66 000104 

67 000106 

68 000110 

69 000112 

70 0001U 
71 

72 



012700 000036 

016700 OOOOOOG 

006300 

000A02 

016700 OOOOOOG 

010002 
050102 
001001 
005201 



000001 





MOV 


#30.. RO 




CALL 


$MUL 




MOV 


$TKPS.R0 




ASL 


RO 




BR 


40$ 


30$: 


MOV 


$TKPS.R0 


AOS: 


CALL 


$MUL 


50$: 


MOV 


R0.R2 




BIS 


R1.R2 




BNE 


60$ 




INC 


R1 


60$: 


RETURN 




70$: 


DRSTS 


D.RS93 



MllTlPLY BV 60. SECONDS/2 
PRODUCT CANNOT OVERFLOW 16 BITS. 
GET TICKS PER SECOND 
MULTIPLY BY 2 

GET TICKS PER SECOND 
CALCULATE TICKS COUNT 
TICKS COUNT ZERO? 

IF NE NO 

MAKE TICKS COUNT 1 

SET DIRECTIVE STATUS 



.END 



•••• H 11 **** 



I «>tA^*«A 



■AAAA^^ IA4 4 Aft 



iz-i\er_9V 9n.A9 baac 9_o 



CVRTH HACRO mi 08 U-OEC-77 20:02 PAGE 2-2 
SYieOL TABLE 



K$SLDC= 000001 
K$»TPS= 00007A 
nS$CRB= 000124 
RS$F11= 000001 
R$$JP0= 000000 
R»»JP1= 000001 



RS$JS1= 000001 
R$$K11= 000001 
R$$P11= 000001 
R$$X11= 000001 
RS$11M= 000000 
R$$11S= 000000 



CtSORE= OOOAOO 
O.RS93= •♦•••♦ GX 
HS$RTZ= 00007A 
KMCNT= 1775A6 
K»»CSR= 1775A6 
IC»»1EN= 000115 

. ABS. 000000 000 
000116 001 
ERRORS DETECTED: 

VIRTUAL MENORY USED: 1191 WORDS ( 5 PAGES) 
DYNAMIC MEMORY: 1S7AA WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:08 
[:A1,2O]CVRTM,SYO:CA1,3OKVRTM/-SP=C1,nEXEMC/ML,C41,103RSXMC,[11.103CVRTM 



SS$ECC= 000000 
SSSYSZ=: 001000 
T$$A11= 000001 
T$$C11= 000001 
T$$J16= 000001 
TSSKMG:: 000000 



T$$M11= 000001 

V$$CTR= 000400 

SCVRTM 

$MUL = *•**♦♦ 

$TKPS 



OOOOOORG 
GX 

****** GX 



*••* I ]\ •*•• 



I .. 




•#«t J t1 ••«« 



**A AAA A J _AAA_«^ nA . A^ MAJ»* 9 



ERROR MACRO Ml 108 U-OEC-77 20:02 PAGE 2 



i 



10 

11 

12 

13 

U 

15 

16 

17 

18 

19 

20 

21 

22 

23 

2A 

25 

26 

27 

28 

29 

30 

31 

32 

33 

3A 

35 

36 

37 

38 

39 

40 

41 

42 

43 

44 

45 

46 000000 

47 

48 

49 

50 

51 

52 

53 

54 

55 

56 

57 



.TITLE ERROR 
.IDENT /03/ 



COPYRIGHT (C) 1974. 1978 

DIGITAL EQUIPMENT CORPORATION, NAVNARD. MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE yiTH THE TERMS OF SUCH LICENSE. 

VERSION 03 

GARY H. MENDELSOHN 1 >-MAY-75 

PREVIOUSLY MODIFIED Bi . 

T. J. MILLER 

MODIFIED BY: 

D. L. GIRDLER ^O-MAY-77 

DL6001 — DON'T INCREMENT ERROR COUNT IF ERROR 
LOGGING IS NOT TURNED ON. 

E. L. BAATZ 13-NOV-77 

EB099 



GUARANTEE THAT SQEMB. SALEB1 . SDVERR. AND 
SDVCER WILL ALWAYS BE DEFINED 



ERROR LOGGING 



.IF DF ESSDVC!E$SNSI!ESSPER 



; 

; EQUATED SYMBOLS 



WRTL1M«520. 
ERRTIM«5.«((S»TPS 

.IFTF 

.MCALL HWDDFt 
HWDDFt 

.IFT 



MACRO LIBRARY CALLS 



.LOGGER WRITE THRESHOLD 

.■TIME LIMIT IN QUEUE BEFORE WRITE 



;OEFINE CPU REGISTERS 



.MCALL CLKDFt.HDRDFt.PCBDFt.PKTDFt.TCBDFt 
CLKDFS ;DEFINE CLOCK OFFSETS AND CODES 

HDRDFt ;DEFINE TASK HEADER OFFSETS 

PCBDFI ; DEFINE PARTITION OFFSETS 



•••• K 11 •••• 



MA^fkn i«4 i AS 



«i_KCr-7-f 1A.r\fS DArC 0.1 



ERROR MACRO Ml 108 U-DEC-77 20:02 PAGE 2-1 



58 

59 

60 

61 

62 

63 

64 

65 

66 

67 

68 

69 

70 

71 

72 

73 

7A 

75 

76 

77 

78 

79 

80 

81 

82 

83 

84 

85 

86 

87 

88 

89 

90 

91 

92 

93 

94 

95 

96 

97 

98 

99 

100 

101 

102 

103 

104 

105 

106 

107 

108 

109 

110 

111 

112 

113 

114 





PKTOFS 
TCBDFS 




; LOCAL 


STORAGE 






.IF OF 


ESSOVC 


; DEVICE TIMEOUT STORA 


OTOTMP: 


.BLKU 
.ENDC 


1 




.IF OF 


ESSNSl 



.•DEFINE I/O PACKET OFFSETS 

.-DEFINE TASK CONTROL BLOCK OFFSETS AND CODES 

.•♦*-20 



; SAVED CSR CONTENTS 



NONSENSE INTERRUPT STORAGE 
ADJACENCY ASSUMED 





.BLKW 


3 


TEMP: 


.BLKB 


1 


NSI: 


.BYTE 


- 


OPS: 


.BLKW 


1 


OPC: 


.BLKW 


1 



.■FORK BLOCK 

:PS STORAGE 

; RE CURS I ON COUNTER 

;OLD PS STORAGE 

;OL0 PC STORAGE 



.ENDC 



;♦ 



•*-SALEMB-ALLOCATE AN ERROR MESSAGE BLOCK 
••-SALEBI-ALLOCAFE AN ERROR MESSAGE BLOCK (ALTERNATE ENTRY) 

THIS ROUTINE IS CALLED BY ERROR SERVICING 

ROUTINES. IT COUNTS THE OCCURENCE OF THE ERROR AND TRIES 

TO ALLOCATE A CORE BLOCK FROM THE POOL. 

IF IT IS SUCCESFUL, IT FILLS IN THE ERROR CODE. THE TIME AND THE 

ERROR SEQUENCE NUMBER. ELSE, IT RETURNS WITH C-SET. 



INPUTS: 



2(SP)«ERR0R CODE 
0(SP)-RETURN 

R1 -%lll OF THE EMB TO ALLOCATE 



OUTPUTS: 



IF C-CLEAR: 

{RO)«ADORESS OF THE FIRST UNFILLED BYTE 

(R1) 'ADDRESS OF THE EMB 

IF C-SET. UNSUCCESSFUL 



•*•• L 11 **** 



ERROR MACRO Ml 108 U-OEC-77 20:02 PAGE 1-2 



115 
116 
117 
118 
119 
120 
121 
122 
123 
12A 
125 
126 
127 
128 
129 
130 
131 
132 
133 
13A 
135 
136 
137 
138 
139 
UO 
U1 
yi-,2 
U3 
UA 
1A5 
U6 

U8 000000 

H9 

150 

151 

152 

153 

15* 

155 

156 

157 

158 

159 

160 

161 

162 

163 

16<i 

165 

166 

167 

168 

169 

170 

171 



: NOTE: R2 AND R3 ARE DESTROYED BY SALEMB THRU SALOCB 



SALEMB: 



SALEBI : 



IDS: 



20S: 



SALEBI ; 



.ENABL 


LSB 




;DLG001 


TST 


SERRPT 


•ERROR LOG TURNED ON? 


;DLG001 


SEC 




•ASSUME NO ALLOCATION 


.DLGOOI 


BEQ 


20$ 


IF EQ NO, DON'T COUNT ERROR 


;DLG001 


INC 


SERRSQ 


COUNT THE ERROR 


.-DLGOOI 


SEC 




•ASSUME ALLOCATION WILL NOT OCCUR 


;»*-1 


MOV 


SERRPT, RO 


•ERROR LOGGING TURNED ON? 




BEQ 


20$ 


■IF EQ NO 




MOV 


SERRLM.RO 


■IS THERE ROOM AVAILABLE? 




BMI 


20$ 


NO IF MI 




CALL 


$ALOCB 


■ALLOCATE THE EMB 




ICS 


20$ 


•UNSUCCESSFUL IF CS 




sua 


R1 .SERRLM 


•UPDATE ROOM LEFT 




nov 


R1.E.SIZE*2{R0) 


FILL IN SIZE OF EMB 




MOV 


RO.RI 


•COPY EMB POINTER 




m 


(R0)*.(R0)* 


; ADVANCE OVER LINK AND E.SI7E 




MOV 


2(SP),(R0)* 


•FILL CODE 




MOV 


#$TTNS.R2 


•POINT PAST CURRENT SECOND 




DEC 


R2 


•SKIP BYTE 




MOVB 


-(R2).(R0)* 


•FILL TIME 




CMP 


R2.*$TTNS-U 


•DONE YET? 




BHI 


10$ 


•IF HI NO 




MOV 


$ERRSa,(R0)> 


•FILL SEQUENCE NUMBER 




CLC 




INDICATE SUCCESS 




MOV 


(SP)*,(SP) 


•REMOVE ERROR CODE 




RETURN 




•EXIT 




.DSABL 


LSB 




.-DLGOOI 



.IFF 

.ENDC 
.IF DF 



EB099 
EB099 
EB099 
EB099 



E$$DVC 



••-SBMSET-SET A DRIVER'S BIT IN THE I/O ACTIVE BITMAP 

THIS COROUTINE RAISES PROCESSOR PRIORITY TO SEVEN AND 
SETS THE MASK IN THE SCB IN SIOABH. 
LETS THE CALLER START THE FUNCTION, AND THEN. 
ALLOWS INTERRUPTS. 

INPUTS: 

(R4)=ADDRESS OF THE SCB 
OUTPUTS: 

SIOABM IS MODIFIED AND RETURN IS MADE AT PR7 



?'WSET::MTPS *PR7 



.•LOCK OUT INTERRUPTS 



•••* n \\ ••** 



MAmn MiirtB i^.t\cr_77 3n*n7 okc^f 7-X 



ERROR MACRO Ml 108 U-OEC-77 20:02 PAGE 2-3 



172 
173 
17A 
175 
176 
177 
178 
179 
180 
181 
182 
183 
184 
185 
186 
187 
188 
189 
190 
191 
192 
193 
19A 
195 
196 
197 
198 
199 
200 
201 
202 
203 
204 
205 
206 
207 
208 
209 
210 
211 
212 
213 

215 
216 
217 
218 
219 
220 
221 
222 
223 
22t. 
225 
226 
227 
226 



000000 



000000 042712 0P0100 
000004 



BIS S.BMSK(R4},SI0ABN ;; .-UPDATE BITMAP 

CALL a(SP)* ;;;CALL THE CALLER 

MTPS #0 ;;;AIL0W INTERRUPTS AND CLEAR C. 

RETURN .-EXIT 



•*-$DT0ER-DEVICE TIMEOUTS 

THIS IS THE EMB FORMATTING ROUTINE WHEN 
TIMEOUT ERRORS APE RECOGNIZED BY THE DRIVER. ON THE 
FIRST OCCURENCE OF AN ERROR, $DTOER ATTEMPTS TO LOG IT. 
IF ERRORS OCCUR ON RETRIES. THEY ARE NOT LOGGED. 

THE ERROR CODE EC.DTO IS PUSHED ON THE STACK, 

THE ERROR IN PROGRESS BIT IS SET IN THE SCB, THE LENGTH OF THE 

REQUIRED EMB IS CALCULATED AND SALEMB IS CALLED. IF $ALEMB FAILS 

TO ALLOCATE A PACKET FOR ANY REASON. SDTOER EXITS 

AND THE POINTER IN THE SCB TO THE EMB IS CLEARED. 

ELSE. THE SAVED SIOABM IS COPIED FROM THE SCB TO THE EMB AND 

A POINTER TO THE EMB IS SAVED IN THE SCB. THE ERROR INFORMATION 

INCLUDING DEVICE REGISTERS IS PUT INTO THE EMB AND THE 

RETURN IS MADE. THE CONTENTS OF THE CSR THAT I!. SAVED IS UNCHANGED 

FROM THE TIME OF TIMEOUT. AFTER THE CSR IS SAVED. DEVICE INTERRUPTS 

ARE DISABLED AND CPU PRIORITY IS LOWERED TO PRO. 



INPUTS: 



(R2)=ADDRESS OF THE CSR 
(R4)=ADDRESS OF THE SCB 



OUTPUTS: 
C=0 



C=1 



IF FUNCTION WAS NOT A USER-MODE DIAGNOSTIC FUNCTION 
THE EMB IS FILLED AND THE SCB CONTAINS A POINTER 
TO IT AND ERROR IN PROGRESS FLAG IS SET IN THE SCB. 

IF FUNCTION WAS A USER-MODE DIAGNOSTIC FUNCTION. 

IN THIS CASE ONLY INTERRUPT ENABLE IS CLEARED AND 
THE PRIORITY IS LOWERED TO C. 



NOTE: IF THE SYSTEM SUPPORTS DIAGNOSTICS R1 WILL BE SET TO THE 

I/O PACKET AODRET.S. IF DIAGNOSTICS ARE NOT SUPPORTED. ALL 
REGISTERS ARE PRESERVED. 



.•DLG001 
;DLG001 
;DLG001 
;*-2 



SDTOER: 



.IFTF 
.ENABL 

,in 

MOV 
.IFTF 

BIC 

MTPS 



LSB 



(R2).DT0TMP 



#100.(R2) 
#0 



;;. -REFERENCE LABEL 



.-;;SAVE CSR CONTENTS 



;;;TURNOFF DEVICE INTERRUPTS 
;;;ALLOW INTERRUPTS 



*••• N 11 **** 



ERROR MACRO Ml 108 U-DEC-77 20:02 PAGE 2-4 



.IF DF DSSIAG 



MOV 

SEC 

BITB 

BNE 

CLC 

.ENDC 



S.PICT(R/.).R1 .-PICK UP ADDRESS OF I/O PACKET 

.-ASSUME USER-MODE DIAGNOSTIC FUNCTION 

#IQ.UMD.I.FCN(R1) ;DIAGNOSTIC FUNCTION? 

100$ ;IF NE YES 

.-INDICATE CSR SAVED 



.-DLG001 



MA 
2A5 
2A6 
247 
248 
249 
250 
251 
252 
253 
254 
255 
256 
257 
258 
259 
260 



.IFT 

MOV 
BR 



#EC.DTO,-(SP) 
10S 



.-INDICATE DEVICE TIMEOUT 
.-ENTER COMMON CODE 



•♦-SDVCER-DEVICE ERROR BIT SET 

THIS IS THE EMB FORMATTING ROUTINE WHEN DEVICE ERROR BIT 
ERRORS ARE RECOGNIZED BY THE DRKiR. ON THE 
FIRST OCCURENCE OF AN ERROR. SDVCER ATTEMPTS TO LOG IT. 
IF ERRORS OCCUR ON RETRIES. THEY ARE NOT LOGGED. 

THE ERROR CODE EC.DVC IS PUSHED ON THE STACK. 

THE ERROR IN PROGRESS BIT IS SET IN THE SCB. THE LENGTH OF THE 

REQUIRED EMB IS CALCULATED AND SALEMB IS CALLED. IF SALEMB FAILS 

TO ALLOCATE A PACKET FOR ANY REASON. SDVCER EXITS. 

AND THE POINTER IN THE SCB TO THE EMB IS CLEARED. 

ELSE. THE SAVED SIOABM IS COPIED FROM THE SCB TO THE EMB AND 

A POINTER TO THE EMB IS SAVED IN THE SCB. THE ERROR INFORMATION 

INCLUDING DEVICE REGISTERS IS PUT INTO THE EMB AND THE 

RETURN IS MADE. 

INPUTS: 

(R4)«ADDRESS OF THE SCB 

OUTPUTS: 

IF SUCCESSFUL, THE EMB IS FILLED. AND THE SCB 
CONTAINS A POINTER TO IT. AN ERROR IN PROGRESS BIT 
IS SET IN THE SCB. ELSE. THE OCCURRENCE OF 
THE ERROR IS COUNTED ONLY. 



NOTE: ALL REGISTERS ARE PRESERVED 



SDVERR:: 

SDVCER: :MOV 
SEC 

10S: MOV 
MOV 
MOV 
MOV 



«C.DVC.-(SP) 

R2.-(SP) 
R1.-(SP) 
RQ,-(SP) 
R2.-(SP) 



; TEMPORARY ♦ • ♦ 

.'INDICATE DEVICE ERROR 

INDICATE NO CSR ADDRESS 

.-SAVE R2 

.•SAVE R1 

.'SAVE RO 

.'SAVE CSR ADDRESS 



t««t t 12 *••* 



Ic "«" 



ERROR MACRO Ml 108 U-DEC-77 20:02 PAGE 2-5 



20$: 



BCC 


20$ 


:WAS THAT A CSR ADDRESS 


CLR 


(SP) 


;N0 IF CS 


MOV 


10(SP).-(SP) 


;MOVF ERROR CODE 


MOV 


R3,12(SP) 


.•SAVE R3 



. 



AT THIS POINT THE STACK CONTAINS: 

0(SP}rERROR CODE 

2(SP)-CSR ADDRESS OR 

A(SP)=SAVED RO 

6(SP}=SAVED R1 
10{SP)=SAVED R2 
12(SP)=SAVED R3 
U(SP)=RETURN 



30$: 



40$: 



50$: 



iO$: 
70$: 



BITB #SP.ZIP!SP.ENB,S 

BNE 80$ 

BIS8 #SP.EIP,S.PRI(R« 

M0V6 S.RCNT(RA).R1 

ASL R1 

ADO #E.LGTH+2.R1 

CALL $ALEMB 

BCC 30$ 

CLR S.BMSV(RA) 

BR 90$ 

MOV S.BMSV(RA},(RO)^ 

MOV R1,S.BMSV(RA) 

MOV S.P»(T(R4),R1 

CLR (RO)* 

MOV I.TCB(R1),R2 

MOV T.PRI(R2).(R0)* 

MOV T.NAM(R2),(R0)t 

MOV T.NAM*2(R2),(R0) 

MOV r.PCB(R2),R2 

MOV P.REL(R2),(R0)* 

MOV P.HDR(R2),R2 

MOV H,CUIC(R2),(R0)* 

MOV I.UCB(R1).(R0)* 

MOV I.FCN(R1).(R0)t 

ADD «I.PRM,R1 

MOV «7,R2 

MOV (R1)*.(R0)* 

DEC R2 

BNE A0$ 

MOVB S.RCNT(R4),R2 

MOV R2,(R0)* 

MOVB S.R0FF(R4),R1 

ADD S.CSh(R«),R1 

CMP R1,(SP) 

BNE 60$ 

MOV 0T0TMP,(R0)+ 

TST (RD* 

BR 70$ 

MOV (R1)*,(R0)t 

DEC R2 

BNE 50$ 



.PRKRA) .-ERROR IN PROGRESS OR LOGGING OFF? 

;YES IF NE 

) .-INDICATE ERROR IN PROGRESS 

.-GET NUMBER OF DEVICE REGS 

.-MAKE BYTE COUNT 

.-MAKE REQUIRED EMB SIZE 

.-TRY TO GET AN EMB 

; SUCCESS !F CC 

.-INDICATE NO EMB 

.-AND EXIT 

.-FILL SAVED BITMAP 
.-SAVE POINTER TO EMB 
.-GET I/O PACKET ADDRESS 
;SAVE ROOM FOR RETRY COUNTS 
.-GET TCB ADDRESS 
.-FILL I/O CNT (AND PRIORITY) 
;FILL TASK NAME 

;GET PCB ADDRESS 

;FILL 1/64TH REAL ADDRESS 

; POINT TO HEADER 

.-FILL TASK UIC 

FILL DEVICE ID 

FILL FUNCTION CODE 

POINT TO PARAMETERS 

SET UP LOOP 

FILL PARAMETERS 

DONE? 

NO IF NE 

GET NUMBER OF DEVICE REGS 

FILL REG COUNT 

GET OFFSEl OF FIRST REG FROM CSR 

POINT rO FIRST REG 

IS THIS THE CSR? 

NO IF NE 

FILL SAVED CSR CONTENTS 

ADJUST R1 

FILL REGISTER 

DONE? 

NO IF NE 



***• c 12 **** 



ERROR NACRO N1108 U-OEC-77 20:02 PAGE 2-6 



3A3 

5A< 

3A5 

346 

347 

3A8 

3A9 

350 

351 

352 

353 000010 

354 

355 

356 

357 

^58 000012 

359 000012 

360 

361 

362 

363 

364 

365 

366 

367 

368 

369 

370 

371 

372 

373 

374 

375 

376 

377 

378 

379 

380 

381 

382 

383 

384 

385 

386 

»7 



80$: 
90$: 


BR 

TST 

TST 

NOV 

NOV 

NOV 

NOV 

• IFTF 


90$ 

(SP)* 

(SP) + 

(SP)*,R0 

(SP)*.R1 

(SP)*.R2 

(SP)*.R3 


100$: 


RETURN 
.DSABL 

.IFF 


LSB 


$DVERR: 
$DVCER: 


.ENDC 






.IF OF 


E$$NSI 



REMOVE ERROR CODE 
REMOVE CSR ADDRESS 
RESTORE RO 
RESTORE R1 
RESTORE R2 
RESTORE R3 



.•EXIT 



EB099 
EB099 
EB099 
EB099 
EB099 



**-$NS0,$NS1,$NS2,$NS3,$NS4.$NS5,$NS6.$NS7- 
NONSENSE INTERRUPT IDENTIFIER ROUTINES 

EACH OF THESE ROUTINES IS VECTORED TO BY ONE OF A GROUP OF 16 
UNUSED VECTORS. THE VECTORS ARE SUB-CODED IN THE PS CONDITION COOES. 



$NSO: 


:CALL 


NSIER ;: 


CALL COMMON CODE 




.WORD 


;; 


GROUP 0-17 


$NS1:: 


CALL 


NSIER :: 






.WORD 


20 ;; 


GROUP 20-37 


$NS2:: 


CALL 


NSIER ;: 






.WORD 


40 ;: 


GROUP 40-57 


$NS3:: 


CALL 


NSIER :: 






.WORD 


60 ;; 


GROUP 60-77 


$NS4:: 


CALL 


f^SIER ;; 






.WORD 


100 ;; 


GROUP 100-117 


$NSS:: 


CALL 


NSIER ;; 






.WORD 


120 ;; 


GROUP 120-137 


$NS6:: 


CALL 


NSIER ;; 






.WORD 


140 ;: 


GROUP 140-157 


$NS7:: 


CALL 


NSIER ;: 






.WORD 


160 ;: 


GROUP 160-177 



♦♦-NSIER-NONSENSE INTERRUPT ERRORS 

THIS ROUTINE IDENTIFIES THE INTERRUPTING VECTOR AND LOGS 
THE ERROR. 



i^'PUTS: 



a(SP)=BITS 06:04 OF UNUSED VECTOR NUMBER 



ft*** D 12 **** 



ERROR MACRO Ml 108 U-DEC-77 20:02 PAGE 2-7 



AOO 
A01 
402 
A03 
40A 
A05 
A06 
A07 
A08 
A09 
AlO 
A11 
A12 
A13 
A1A 
A15 
A16 
A17 
A18 
A19 
A20 
A21 
A22 
A23 
A2A 
A25 
A26 
A27 
A28 
A29 
A30 
A31 
A32 
A33 
A3A 
A35 
A36 
A37 
A38 
A39 
AAO 
AA1 
AA2 
AA3 
AAA 
AA5 
AA6 
AA7 
AA8 
AA9 
ASO 
A51 
A52 
A53 
A5A 
A55 
A 56 



OUTPUTS: 



AN EMB IS ALLOCATED AND QUEUED TO THE LOGGER WHICH 
CONTAINS THE VECTOR NUMBER AND THE I/O ACTIVE BITMAP. 



NSIER: 



10$: 



20$: 



MFPS 


-(SP) 




SAVE VECTOR ID (MODULO 20) 


INCB 


NSI 




■NSI IN PROGRESS? 


BEQ 


10$ 




■NO IF EQ 


CMP 


(SP)+.(SP)* 




■YES. CLEAR STACK 


RTI 






-AND RETURN 


BIC 


*1 77760. (SP) 




ISOLATE VECTOR ID(MOD 20) 


MOV 


(SP)t.TEMP 




:SAVE VECTOR ID(MOD 20) 


BIS 


a(SP)*.TEMP 




■ADD GROUP BIAS 


MOV 


(SP).OPC 




;SAVE PREINTERRUPT PC 


MOV 


2(SP),0PS 




;SAVE PREINTERRUPT PS 


CALL 


$INTSV.PR7 




■SWITCH STACKS 


MOV 


$I0ABM,R5 




■COPY lOABM 


MOV 


#TEMP,RA 




■POINT PAST FORK BLOCK 


CALL 


$F0RK1 




■AND FORK. SAVING R5 


MOV 


#E.OPC*2*2.R1 


SET 


MOV 


*EC.NSI.-(SP) 


UP TO 


CALL 


$ALEMB 


CREATE EMB 


BCS 


20$ 


FAILED IF CS 


MOV 


R5,(R0)« 


FILL BITMAP 


MOV 


TEMP.(RO)+ 


FILL ID AND COUNT 


MOV 


OPS.(RO)* 


FILL OLD PS 


MOV 


OPC.(RO) 


FILL OLD PC 


MOV 


#$QEMB,-(SP) 


SET UP TO CALL $QEMB 


MOV 


*-1.TEMP 


RESET RECURSION COUNTER 


RETURN 




EXIT 


.ENDC 






.IF DF 


E$$DVC!E'V4SI 







**-$QEMB-QUEUE AN EMB 

THIS IS THE COMMON POINT FOR ALL EMBS. THE EMB IS QUEUED 

FIFO IN THE ERROR QUEUE. IF THERE ARE 

ENOUGH BYTES OF EMBS IN THE POOL. THE LOGGER TASK IS AWAKENED. 

ELSE. IF THE QUEUE WAS EMPTY. A SCHEDULE REQUEST IS MADE 

SO A QUEUED EMB WILL BE WRITTEN WITHIN A TIME LIMIT. 

ELSE. A RETURN IS MADE. 

INPUTS: 

(R1)=ADDRESS OF THE EMB 

OUTPUTS: 

THE EMB IS QUEUED. CONDITIONALLY. THE LOGGER IS WAKED 
OR A SCHEDULE REQUEST IS MADE FOR THE LOGGER 

NOTE: REGISTERS R0-R3 ARE DESTROYED 



*••• E 12 **** 



ERROR MACRO Ml 108 U-DEC-77 20:02 PAGE 2-& 



A57 

A58 

459 

A60 

461 

462 

463 

464 

465 

466 

467 

468 

469 

470 

471 

472 

473 

474 

475 

476 

477 

478 

479 

480 

481 

482 

483 

484 

485 

486 

487 

488 

489 

490 

491 

492 

493 

494 

495 

496 

497 

498 

499 

500 

501 

502 

503 000012 

504 

505 

506 

507 



SQEMB:: SAVNR 
MOV 
BEQ 
MOV 
MOV 
CALL 
ADD 
CMP 
BGE 
TST 
BNE 



.ENABL LSB 



;SAVF R4 ANO R5 

.-GET ERRLO'J TC8 

;NOT INITJALIZED IF EQ 

.•POINT TO ERROR QUEUE LISTHEAD 

.•SAVE CONTENTS OF LISTHEAD 

.•QUEUE THE EMB FIFO 



SERRPT.RS 

30$ 

#SERRHD,RO 

(RO).-(SP) 

SQINSF 

E.SIZE>2(R1),$ERRSZ .-UPDATE POOL USAGE 

SERRSZ.^WRTLIM : ENOUGH TO WRITE 

10$ ;YES IF GE 

(SP)* .-WAS ERROR QUEUE EMPTY? 

20$ :N0 IF NE 



ERROR QUEUE WAS EMPTY. SET A SCHEDULE REQUEST FOR THE 
LOGGER AT ERRTIM FROM NOW. SO THAT THE EMB WILL BE 
WRITTEN IF NO MORE ERRORS OCCUR BEFORE THEN. 



.•SIZE OF CLOCK QUEUE ENTRY 
.•TRY TO GET SOME CORE 
.•UNAVAILABLE IF CS 
.•INDICATE DEFAULT UIC 
;HIGH TIME=0 
:LOW TIME 

.•SINGLE-SHOT TASK REQUEST 
;MAKE REQUEST 



MOV 


#C.LGTH.R1 


CALL 


$ALOCB 


BCS 


15$ 


CLR 


C.UIC(RO) 


CLR 


R1 


MOV 


#ERRTIM.R2 


MOV 


#C.SSHT,R4 


CALLR 


$CLINS 



REQUEST THE LOGGER NOW 



000001 



10$: 


TST 


(SP) + 


CLEAN STACK 


15$: 


MOV 


R5.R0 


COPY LOGGER TCB 




TST 


T.STAT(RO) 


ERRLOG RUNNING? 




BPL 


20$ 


YES IF PL 




CLR 


R1 


INDICATE DEFAULT UIC 




CALLR 


$TSKRT 


REQUEST LOGGER 


20$: 


RETURN 




EXIT 


30$: 


CRASH 




NO ERRORS ARE QUEUED IF 
NO LOGGER IS PRESENT 




.DSABL 


LSB 






.IFF 






$aEMB: 


.ENDC 
.END 


1 





EB099 
EB099 
EB0V9 
EB099 



•**t f 12 **** 



ERROR MACRO MHOS 
SYMBOL TABLE 



U-DEC-77 20:02 PAGE 2-9 



CS$ORE= 


OOOAOO 


FE.PKT= 


000100 


FE.CAL= 


OOOOAO 


FE.PLA= 


000020 


FE.CEX= 


020000 


HSSRTZ= 


00007A 


FE.ORV= 


000010 


K»$CNT= 


1775A6 


FE.EXP= 


000200 


K$$CSR= 


1775A6 


FE.FXT= 


000001 


KS$IEN= 


000115 


FE.EXV= 


OOOOOA 


KS$LOC= 


000001 


FE.LSI= 


OOOAOO 


K$$TPS= 


00007A 


FE.MUP= 


000002 


MPAR = 


172100 


FE.MXT= 


OAOOOO 


MPCSR = 


1777A6 


FE.NLG= 


100000 


M$SCRB= 


0001 2A 


. ABS. 


000000 


000 






000012 


001 




ERRORS 


DETECTED: 








PIRQ = 


\mn 


PRO = 


000000 


PR1 = 


OOOOAO 


PRA = 


000200 


PR5 = 


0002A0 


PR6 = 


000300 


PR7 = 


0003AO 


PS 


177776 


R$$F11= 


000001 


R$$JPO= 


000000 


R$$JP1= 


000001 



RWJS1 = 
RSSK11= 
R«P11 = 
R$SX11= 
RSS11M= 
R$$11S= 
SUR = 
S$$ECC= 
S»$YSZ= 
TPS = 
T»$A11= 



000001 
000001 
000001 
000001 
000000 
000000 
177570 
000000 
001000 
17756A 
000001 



T$$C11= 

T$$J16= 

T$$KMG= 

T$$M11= 

V$$CTR= 

SALEB1 

SDTOER 

SDVCER 

SDVERR 

SQEMB 



000001 

000001 

000000 

000001 

OOOAOO 

OOOOOORG 

OOOOOORG 

00001 2RG 

00001 2RG 

00001 2RG 



VIRTUAL MEMORY USED: 1758 WORDS ( 7 PAGES) 
DYNAMIC MEMORY: 157AA WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:15 

CA1,20]ERROR.SY0:CA1.30]ERROR/-SP=C1.nEXEMC/ML,CA1,10]RSXMC.C11.10]ERROR 
*:■ 



•ft** G 12 **** 




**** H 12 **** 



lOSUB MACRO Ml 108 U-DEC-77 20:02 PAGE 2 



.TITLE lOSUB 
.IDENT /10/ 



10 
11 
12 
13 
H 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
3A 
35 
36 
37 
3d 
39 
AO 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 

ii 

54 
55 
56 
57 



COPYRIGHT (C) 1974, 1978 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 10 

D. N. CUTLER 4-AU6-73 

PREVIOUSLY MODIFIED BY: 

P. J. BEZEREDI 

D. N. CUTLER 

C. A. D'ELIA 

T. J. MILLER 

MODIFIED BY: 

P. J. BEZEREDI 30-NOV-76 

PB010 — ADDITION OF RL11 AND RM03 SUPPORT. 
T. J. MILLER 3-JAN-77 

TM070 — CORRECT ERROR IN $MUL ROUTINE. 
P. J. BEZEREDI 23-FEB-77 

PB017 — ADDITION OF RIC07 SUPPORT. 

T. J. MILLER 4-MAR-77 

TM075 — ADDITION OF SUPPORT FOR BLOCK LOCKING IN 
SHARED FILES. 

•^ T. J. MILLER 27-APR-77 

TM081 — CORRECT OBSCURE ERROR IN I/O KILL. 

T. J. MILLER 26-MAY-77 



TM086 — MODIFY JIOFIN TO CALL COMMON EVENT FLAG SETTING 
ROUTINE. 

T. J. MILLER 18-JUL-77 

TM095 — ADDITION OF DYNAMIC UMR ALLOCATION. 

T. J. MILLER 12-SEP-77 

TM102 — CHANGE CALL IN SIOFIN FROM SCHKPT TO SICHKP TO 
SUPPORT MULTIPLE I/O'S FOR CHECKPOINTABLE TASKS. 



•••• I 12 **** 



lOSUB MACRO mi08 U-OEC-77 20:02 PAGE 2-1 



71 
72 



58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 

69 000000 

70 000000 
000000 
000000 

73 000000 

74 000000 
75 

76 

77 

78 

79 

80 

81 

82 

83 

84 

85 

86 

87 

88 

89 

90 

91 

92 

93 

94 

95 

96 

97 

98 

99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
114 



T. J. MILLER 2-N0V-77 

TM105 — ALLOW FOR DEVICE UNIT NUMBERS > 127. 
I/O RELATED ROUTINES 
MACRO LIBRARY CALLS 

.MCALL F110FS.HDRDF»,HWDDF$.PCBDF$,PKTDF$.TCBDF$ ; TM075 

FIIDFS .'DEFINE WINDOW AND LOCK BLOCK OFFSETS ; TM075 

HDRDFS .-DEFINE TASK HEADER OFFSETS :**-1 

HWDDFS .-DEFINE HARDWARE REGISTERS 

PCBDF$ .-DEFINE PARTITION CONTROL BLOCK OFFSETS 

PKIDFS ;OEFINE I/O PACKET OFFSETS 

TCBDFS :DEFINE TASK CONTROL BLOCK OFFSETS 

**-SACHKP-ADDRESS CHECK PARAMETER BLOCK 
•*-SACHKW-ADDRESS CHECK PARAMFTER BLOCK WORD ALIGNED 
**-MCHK2-A0DRESS CHECK 2 BYTE DIRECTIVE PARAMETER BLOCK 

THESE ROUTINES ARE CALLED TO ADDRESS CHECK A TASK SPECIFIED PARAMETER 
BLOCK TO INSURE IT IS WITHIN THE TASK'S ADDRESS SPACE AND ALIGNED PROPERLY. 
IF EITHER CHECK FAILS. THEN A DIRECTIVE STATUS OF 'D.RS98' IS RETURNED. 



INPUTS: 



R0-STARTIN6 ADDRESS OF THE BLOCK TO BE CHECKED. 
R1=LENGTH OF THE BLOCK TO BE CHECKED IN BYTES. 



OUTPUTS: 



t 
i 

i 
i 
i 
I 



THE SPECIFIED BLOCK IS CHECKED FOR PROPER ALIGNMENT AND WHETHER 
IT IS WITHIN THE TASK'S ADDRESS SPACE. IF EITHER CHECK FAILS. 
THEN A DIRECTIVE STATUS OF 'D.RS98' IS RETURNED. ELSE A RETURN 
TO THE CALLER IS EXECUTED. 

RO AND R3 ARE PRESERVED ACROSS CALL. 



.IF DF ASSCHK!MI$MGE 

.ENABL LSe 

.IF NOF MIIMGE 

lACHK2::nOV «2.R1 

.IFTF 

lACHKP::MOV R3.R0 

.IFF 



;SET TO CHECK 2 BYTES 

.-SET ADDRESS OF BLOCK TO CHECK 



*••• J 12 **** 



lOSUB HACW) mi08 U-DEC-77 20:02 PAGE 2-2 



115 
116 
117 
118 
119 
120 
121 
122 
123 
12* 
125 
126 
127 
128 
129 
150 
131 
132 
133 
134 
135 
136 
137 
138 
139 
UO 
U1 
U2 
U3 
144 
145 
146 
147 
148 
149 
150 
151 
152 
153 
154 
155 
156 
157 
158 
159 
160 
161 
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 



CALL 

BCS 

CALL 

NOV 

NOV 

RETURN 

.ENDC 



$ACHKW::CALL 

BCC 
10S: DRSTS 



SACHCK 

10S 

SRELOC 

R1,KISAR6 

R2.R3 



SACHCK 

50$ 

D.RS98 



ADDRESS CHECK WORD ALIGNED 

IF rs CHECK FAILURE 

RELOCATE PARANETER BLOCK ADDRESS 

NAP TO PARANETER BLOCK 

REDEFINE PARANETER BLOCK ADDRESS 



.'ADDRESS CHECK WORD ALIGNED 

ilF CC OKAY 

;SET DIRECTIVE STATUS 



••-MCHKB-ADDRESS CHECK BYTE ALIGNED 
**-MCHCK-ADDRESS CHECK WORD ALIGNED 

THIS ROUTINE IS CALLED TO ADDRESS CHECK A BLOCK OF NENORY TO SEE WHETHER 
IT LIES WITHIN THE ADDRESS SPACE OF THE CURRENT TASK. 



INPUTS: 



RO'STARTING ADDRESS OF THE BLOCK TO BE CHECKED. 
RIsLENGTH OF THE BLOCK TO BE CHECKED IN BYTES. 



OUTPUTS: 



C=1 IF ADDRESS CHECK FAILED. 
C-0 IF ADDRESS CHECK SUCCEEDED. 

RO AND R3 ARE PRESERVED ACROSS CALL. 



$ACHCK::ASR 
BCS 
ASL 

SACHKB:: 



RO 

50t 

RO 



.IF NOF NtSMGE 
SAVNR 



ODD ADDRESS? 
IF CS YES 
REALIGN ADDFiESS 
REFERENCE LABEL 



;$AVE R4 AND RS 



.IFTF 



$TKTCB.R2 .GET TCB ADDRESS OF CURRENT TASK 

.-ASSUME TASK IS PRIVILEGED 
#T3.PRV.T.ST3(R2) .-PRIVILEGED TASK? 



50$ 

R1 

R0.R1 

50i 



IF NE YES 

CALCULATE HIGHEST ADDRESS OF BLOCK 

IF CS ADDRESS WRAP AROUND 



.IFF 



••*• K 12 •••♦ 



rzrr 



lOSUB MACRO Ml 108 U-OEC-77 20:02 PAGE 2-3 



172 

173 
17A 
1?5 
176 
177 
178 
179 
180 
181 
182 
183 
184 
185 
186 
187 
188 
189 
190 
191 
192 
193 
19A 
195 
1% 
■.v7 
^98 

;99 

200 
201 
202 
203 
20A 
205 
206 
207 
208 
209 
210 
211 
212 
213 

215 
216 
217 
218 
219 
220 
221 
222 
225 
22U 
225 
226 
227 
228 



MOV 
MOV 
MOV 

• IFT 

MOV 
MOV 
MOV 
MOV 

.IFTF 



SHEADR,R2 

H.UND(R2},R2 

(R2)»,-(SP) 



SHEADR.R4 
H.yND(R4).R2 
(R2)».-(SP) 
(R2) .R5 



:GET ADDRESS OF CURRENT TASK HEADER 
.-POINT TO NUMBER OF yiNDOU BLOCKS 
;PUSH NUMBER OF WINDOW BLOCKS 



;GET ADDRFSS Or CURRENT TASK HEADER 
: POINT TO NUMBER OF WINDOW BLOCKS 
:PUSK NUMBER OF WINDOW BLOCKS 
:SAVE PCB ADDRESS OF TASK PARTITION 



15$: 


TST 


(R2)* 


IS NEXT WINDOW MAPPED? (W.BPCB) 




BEQ 


20$ 


IF EQ NO 




CMP 


R0.(R2> 


COMPARE LO-W LIMITS (W.8LVR) 




BLO 


20$ 


IF LO NOT IN DESCRIPTOR 




CMP 


R1,2(R2) 


■COMPARE HIGH LIMITS (W.BHVR) 




BLOS 


25$ 


IF LOS BUFFER IS IN DESCRIPTOR 


20$: 


ADH 


«W.BL6H-2.R2 


•POINT TO NEXT DESCRIPTOR 




DEC 


(SP) 


•MORE DESCRIPTORS TO GO? 




BGT 


15$ 


IF GT YES 




BR 


30$ 


•ELSE EXIT WITH CS 


25$: 


.IFT 




REFERENCE LABEL 




CMP 


-(R2),R5 


TASK PARTITION? 




BNE 


40$ 


IF NE NO 




CMP 


R0.H.6ARD(RA) 


HEADER VIOLATION? 




BHI 


40$ 


IF HI NO 




• IFF 








BIT 


#4,W.BLPD-W.BLVR(R2) .-WRITE ACCESS PERMITTFO? 




BNE 


40$ 


IF NE YES 




.ENDC 






30$: 


con 

RETURN 


(SP)* 


•CLEAN STACK AND SET CARRY 


40$: 


TST 


(SP)* 


CLEAN STACK AND CLEAR CARRY 


50$: 


RETURN 








.DSABL 


LSB 





.ENDC 



•*-$CEFN-CONVERT EVENT FLAG NUMBER FOR DIRECTIVE 
••-$CEFI-CONVERT EVENT FLAG NUMBER FOR I/O 

THIS ROUTINE IS CALLED TO CONVERT AN EVENT FLAG NUMBER TO AN 
EVENT FLAG MASK WORD AND EVENT FLAG MASK ADDRESS. IF AN ILLEGAL 
EVENT FLAG IS SPECIFIED. THEN A DIRECTIVE STATUS OF 'D.RS97' IS 
RETURNED. ELSE THE EVENT FLAG NUMBER IS CONVERTED AND THE COM- 



•••• L 12 **** 



lOSUB MACRO mi 08 H-OEC-77 20:02 PAGE 2-4 



229 
230 
231 
232 
233 
23A 
235 
236 
237 
238 
239 
2A0 
2A1 
242 
243 
244 
245 
246 
247 
248 

249 000000 

250 000002 

251 000004 

252 000006 

253 000010 

254 000012 

255 000014 

256 000020 

257 000022 

258 000026 

259 000030 

260 000032 

261 000034 

262 000036 

263 000040 

264 000044 

265 000046 

266 000050 

267 000052 

268 000054 

269 000056 

270 000060 

271 000064 

272 000066 
273 

27i* 
275 
276 
277 
27B 
279 
280 
281 
282 
283 
284 
285 



PONENT PARTS ARE RETURNED TO THE CALLER. 
INPUTS: 



RO=EVENT FLAG NUMBER TO BE CONVERTED. 

R5=TCB ADDRESS OF THE TASK THE EFN APPLIES TO. 



OUTPUTS: 



112300 

005203 

010001 

000261 

001425 

005300 

012702 000040 

010501 

062701 000022 

020002 

103405 

160200 

020002 

103013 

012701 OOOOOOG 

006202 

020002 

103402 

160200 

005721 

006300 

016000 OOOOOOG 



SCEFN: 
»CEFI: 



10$: 



20$: 

30$: 
40$: 



C=1 IF NO EVENT FLAG NUMBER WAS SPECIFIED. 

R0=ZER0. 

RlrZERO. 
C=0 IF AN EVENT FLAG NUMBER WAS SPECIFIED. 

R0=EVENT FLAG MASK WORD. 

R1=EVENT FLAG MASK ADDRESS. 

R3 IS PRESERVED ACROSS CALL IF ENTRY AT $CEFI. ELSE R3 IS ADVANCED BY 2. 



.ENABL 

M0V8 

INC 

MOV 

SEC 

BEQ 

DEC 

MOV 

MOV 

ADD 

CMP 

BLO 

SUB 

CMP 

BHIS 

MOV 

ASR 

CMP 

BLO 

SUB 

TST 

ASL 

MOV 

RETURN 

DRSTS 



LSB 

(R3)*.R0 
R3 
R0.R1 

30$ 

RO 

#32., R2 

R5.R1 

#T.EFLG.R1 

R0.R2 

10$ 

R2,R0 

R0.R2 

40i 

nCOMEF.RI 

R2 

R0,R2 

20$ 

R2.R0 

(R1) + 

RO 

SBTMSK(R0),R0 

D.RS97 



GET EVENT FLAG NUMBER 

ADVANCE TO NEXT WORD 

COPY EFN 

ASSUME NONE SPECIFIED 

IF EQ NO EFN SPECIFIED 

BACK OFF EFN BY ONE 

SET EFN DIVIDER 

POINT TO FIRST TASK MASK WORD 

IN TASK EFN SET? 

IF LO YES 

NORMALIZE TO COMMON SET 

LEGAL EFN? 

IF HIS NO 

POINT TO FIRST COMMON MASK WORD 

HALVE DIVIDER 

FIRST MASK WORD? 

IF LO YES 

NORMALIZE EFN 

POINT TO SECOND MASK WORD 

CONVERT EFN TO WORD INDEX 

GET PROPER MASK WORD 

;SET DIRECTIVE STATUS 



••-$DVMSG-DEV1CE MESSAGE OUTPUT 

THIS ROUTINE IS CALLED TO SUBMIT A MESSAGE TO THE TASK TERMINATION 
NOTIFICATION TASK. MESSAGES ARE EITHER DEVICE RELATED OR A CHECKPOINT 
WRITE FAILURE FROM THE LOADER. 



INPUTS: 



R4»ADDITI0NAL PARAMETER ; TM081 

R5«ADDRESS OF THE UCB OR TCB THAT THE MESSAGE APPLIES TO. ;«♦-! 



*••* n 12 **** 



■#«*t ^ 



■larnn ui 1 nB ii._iscr_7'y on.no Dkr.t 3-C 



lOSUB MACRO Ml 108 1A 


-OEC-77 20:02 


i 






290 










293 






29A 






295 






296 






297 000070 






298 






299 






300 






301 






302 000070 


010003 




303 000072 


005767 


OOOOOOG 


30A 000076 


001772 




303 000100 


012701 


000010 


306 00010A 






307 000110 


103765 




308 000112 


010001 




309 0001 U 


005720 




310 000116 


010320 




311 000120 


010520 




312 






313 000122 


010A10 




31A 0001 2A 


016700 


OOOOOOG 



PAGE 2-5 



OUTPUTS: 



A FOUR WORD PACKET IS ALLOCATED. RO AND R5 ARE STORED IN THE 
SECOND AND THIRD WORDS RESPECTIVELY, AND THE PACKET IS THREADED 
INTO THE TASK TERMINATION NOTIFICATION TASK MESSAGE QUEUE. 



NOTE: 



$DVMSG: 



IF THE TASK TERMINATION NOTIFICATION TASK IS NOT INSTALLED 
OR NO STORAGE CAN BE OBTAINED. THEN THE MESSAGE REQUEST 
IS IGNORED. 



:REF LABEL 



315 000130 

316 

317 

318 

319 

320 

321 

322 

323 

324 

325 

326 

327 

328 

329 

330 

331 

332 

333 

334 

m 

338 

339 



.IF DF 


TSSKKG 


MOV 


R0.K3 


TST 


STKNPT 


BEQ 


30$ 


MOV 


#8..R1 


CALL 


SALOCB 


BCS 


SOS 


MOV 


R0.R1 


TST 


(RO)* 


MOV 


R3.(R0)+ 


MOV 


R5.(R0)+ 


.•INSERT UCB OR 


TCB ADDRESS 


MOV 


RA.(RO) 


MOV 


STKNPT.RO ; 


CALLR 


SEXRQF 


.IFF 




RETURN 


; 


.ENDC 




.DSABL 


LSB 



SAVE MESSAGE NUMBER 

TKTN INSTALLED? 

IF EQ NO 

SET LENGTH OF BLOCK NEEDED 

GET A CORE BLOCK 

IF CS DIDN'T GET ONE 

SET ADDRESS OF MESSAGE BLOCK 

POINT 10 SECOND WORD IN BLOCK 

INSERT MESSAGE NUMBER 



INSERT ADDITIONAL PARAMETER 
PICK UP TKTN TCB ADDRESS 
REQUEST TKTN AND QUEUE MESSAGE 



TM081 
1M081 
TM081 

•»-1 



**-JGTPKT-GET I/O PACKET FROM REQUEST QUEUE 

THIS ROUTINE IS CALLED BY DEVICE DRIVERS TO DEQUEUE THE NEXT I/O REQUEST TO 
PROCESS. IF THE DEVICE CONTROLLER IS BUSY, THEN A CARRY SET IWICATION IS 
RETURNED TO THE CALLER. ELSE AN ATTEMPT S MADE TO DEQUEUE !•' NEXT REQUEST 
FROM THE CONTROLLER QUEUE. IF NO REQUEST CAN BE DEQUEUED. THtN A CARRY 
SET INDICATION IS RETURNED TO THE CALLER. ELSE THE CONTROLLER IS SET BUSY AND 
A CARRY CLEAR INDICATION IS RETURNED TO THE CALLER. 

INPUTS: 

R5=ADDRESS OF THE UCB OF THE CONTROLLER TO GET A PACKET FOR. 
OUTPUTS: 

C=1 IF CONTROLLER IS BUSY OR NO REQUEST CAN BE DEQUEUED. 



**** N 12 **** 



lOSLB MACRO M1108 U-DEC-77 20:02 PAGE 2-6 



3A3 

3AA 

3A5 

3A6 

3A7 

3A8 

3A9 

350 

351 

352 

353 0001 3A 

35A OOOUO 

355 OOOUA 

356 

357 

358 

359 

360 

361 

362 

363 

36A 

365 000U6 

366 000150 

367 000152 

368 0001 5A 

369 000156 

370 000162 

371 000166 

372 000170 

373 0001 7A 
37A 000202 
375 

376 
377 
378 
379 
380 
381 
382 
383 
384 

385 00020A 

386 000212 

387 QQ02U 

388 000222 

389 00022A 

390 000226 

391 000230 

392 000232 

393 00023A 
39A 0002A0 

395 0002AA 

396 000250 

397 00025A 
398 

399 



01650A 
10576A 
001076 



010A01 
010100 
011001 
001 A 72 
016105 
016503 
001 A20 
016102 
032762 
001A10 



032765 
001A0A 

Mil 

020203 
001350 
011110 
001002 
01006A 
01016A 
116102 
122702 
001007 



C=0 IF A REQUEST WAS SUCCESSFULLY DEQUEUE. . 
R1=A0DRESS OF THE I/O PACKET. 
R2=PHYSICAL UNIT NUMBER. 
R3=C0NTR0LLER INDEX. 
RA=ADDRESS OF THE STATUS CONTROL BLOCK. 
R5=ADD')ESS OF THE UNIT CONTROL BLOCK. 

NOTE: RA AND R5 ARE DESTROYED BY THIS ROUTINE. 



OOOOOOG 
OOOOOOG 



SGTPKT: 



:MOV 
TSTB 
BNE 



.IF DF 

BICB 

.ENDC 



10S: 



000010 
OOOOOOG 

OOOOOA 

010000 000036 



OOOOOOG OOOOOOG 
OOOOOOC 000013 



000002 
OOOOOOG 
000013 
OOOOOOC 



151: 
20t: 

soil 



.IF DF 
.ENDC 



Btr 

BEQ 

CMP8 

BEQ 

CMP 

BNE 

MOV 

BNE 

MOV 

MOV 

MOVB 

CMPB 

BNE 



U.SCB(R5),RA 

S.STS(RA) 

70S 



GET ADDRESS OF STATUS CONTROL BLOCK 

CONTROLLER BUSY? 

IF NE CONTROLLER IS BUS'' 



ESSDVC 

«SP.EIP,S.PRI(RA) .-CLEAR ERROR IN PROGRESS 



RA.RI :SET POINTER TO !/0 QUEUE LISTHEAD 

RI.RO .-SAVE ADDRESS OF PREVIOUS PACKET 

(RO).RI ;GET address OF NEXT PACKET 

70S :1F EQ NO MORE PACKETS TO SCAN 

I.UCB(R1),R5 ;GET ADDRESS OF UNIT CONTROL BLOCK 

U.ATT{R5),R3 ;UNIT ATTACHED? 

20S :IF EQ NO 

I.TCB(R1).R(.' :GF ADDRESS OF REQUESTOR TASK TCB 

/rT3.PRV.T.ST3{R2) ;USK PRIVILEGED? 

15S :IF EQ NO 



DSSISK 

R2.SLDRPT 
20i 



.-REQUESTING TASK THE LOADER? 

;IF cJ YES-ALWAYS BREAK THRU ATTACH 



»DV.TTY,U.CW1<R5 
15S 

/VI0.WLB/256.,I.F 
20S 

%" 

(RI).(RO) 

30S 

R0,2(RA) 

RI.S.PKT(RA) 

I.FCN»MR1),R2 

#10. ATT/256., R2 

AOS 



) ; DEVICE A TERMINAL? 

;IF EQ NO 

CN^KRD .-WRITE LOGICAL FUNCTION 

;IF EQ YES-J3REAK THRU ATTACH 

;1S THIS THc APPROPRIATE TASK? 

'IF NE NO 

: CLOSE UP LIST REMOVING ENTRY 

;IF NE LAST ENTRY WAS NOT REMOVED 

:$ET ADDRESS OF NEW LAST IN LIST 

;SET ADDRESS OF CURRENT I/O PACKET 

.-GET I/O FUNCTION CODE 

;ATTACH FUNCTION? 

;IF NE NO 



•«*• B 15 ••*• 



•**♦ B 13 •**♦ 



lOSUB I^CRO mi08 U-DEC-77 20:02 PAGE 2-7 



AOO 
401 
A02 
A03 
A04 
A05 
A06 
A07 
A08 
409 

410 000256 

411 000262 
412 

413 

414 

415 

416 

417 

418 

419 

420 000264 

421 

422 

423 

424 000266 

425 000272 
426 

427 
428 
429 
430 
431 
432 
433 
434 
435 
436 
437 
438 
439 
440 

441 000274 

442 000300 

443 000302 

444 000306 

445 000310 

446 000312 
447 

448 
'.9 

^ J 

451 
452 
453 
454 

455 000314 

456 000320 



.IF OF AISCPS 



016100 000004 
005703 



35$: 



001413 



012700 OOOOOOC 
000420 



122702 OOOOOOC 

001022 

012700 OOOOOOC 

005703 

001411 

005000 



36$: 



37$: 



40$: 



MOV 

TST 

BPL 

BITB 

BEQ 

• IFTF 

MOV 
TST 



010065 OOOOOOC 50$: 
132765 OOOOOOG OOOOOCG 



MOV 
BR 



.IFT 

BIIB 

BEQ 

BIT 

BEQ 

BISB 

BR 

MOV 

BR 

.IFTF 

CMPB 

BNE 

MOV 

TST 

BEQ 

CLR 

.IFT 

BICB 

.ENDC 

MOV 
BITB 



#IE.PRIft377.R0 ;ASSUME PRIVILEGE VIOLATION 
U.CWKRS) ;MOUNTABLE DEVICE? 
35$ ;IF PL NO 

#US.MNT!US.F0R,U.STS(R5) ;NOT MOUNTED OR FOREIGN? 
60$ :IF EQ NO 



I.TCB(R1),R'' 
R3 



.IF DF D$$IAG 

BEQ 36$ 

.IFF 

BEQ 50$ 

.IFTF 



; ASSUME SUCCESSFUL ATTACH 
;UNIT ALREADY ATTACHED? 



:IF EQ NO 



;IF EQ NO 



/riE.DAAe377,R0 ;SET STATUS OF DEVICE ALREADY ATTACHED 
60$ 



*IQ.UM0,I.FCN(R1) ;IS THIS A DIAGNOSTIC ATTACH? 

50$ ;IF EO NO 

/TDV.UMD.U.CWKRS) ;USER MODE DIAGNOSTICS SUPPORTED? 

37$ ;1F EQ NO 

/»US.UMO.U.ST2(R5) .-INDICATE DIAGNOSTIC ATTACH 

50$ 

#IE.IFC8377,R0 ;SET STATUS OF ILLEGAL FUNCTION 

60$ 



(r:0.DET/256..R2 .'DETACH FUNCTION 



80$ 

*IE.0NAI377,R0 

R3 

60$ 

RO 



;IF NE NO 

; ASSUME DEVICE NOT ATTCHED 

.•UNIT ATTACHED? 

;IF EQ NO 

;SET TO DETACH UNIT 



#US.UMD.U.ST2(R5) ;RESET DIAGNOSTIC BIT 



R0,U.ATT(R5) .-ATTACH/DETACH UNIT 

#UC.ATT.U.CTL(R5) ;0OES DRIVER WANT CONTROL ON ATTACH/DETACH? 



•••• C 13 •••• 



lOSUB MACRO Ml 108 U-DEC-77 20:02 PAGE 2-8 



t 13 "WWW 



000326 001007 

000330 012700 OOOOOOC 

00033A 

0003A0 000675 

0003A2 000261 

0003AA OOOA23 

0003A6 



60$: 
70$; 
SOS: 



BNE 

MOV 

CALL 

BR 

SEC 

BR 



.IFT 

TST 
BPL 



120$ 

#IS.SUC8377,R0 
$I0ALT 
$GTPKT 

130$ 



U.CWKRS) 
120$ 



IF NE YES 

SET SUCCESSFUL COMPLETION STATUS 

FINISH I/O OPERATION 

SET CONTROLLER BUSY OR NO REQUEST 

REF LABEL 



.•DEVICE MOUNTABLE? 
;IF PL NO 



.IF DF D$$IAG 



BITB 
BNE 

.ENDC 



/»IQ.UMD,I.FCN(R1) ;IS THIS A DIAGNOSTIC FUNCTION? 
120$ ;IF NE YES, IT CAN'T BE AN ACP FUNCTION 



CMP 
BHI 



#7,R2 
120$ 



;ACP FUNCTION? 
:IF HI NO 



90$: 



100$: 



.IF DF R$$LKL 



CMP 
BEQ 

.IFTF 

SUB 
BEQ 
DEC 
BNE 



.IFT 

CALL 
BCS 

.E)<DC 



CALL 
BCS 
TST 
BEQ 

MOV 

CALL 

JMP 

.ENDC 



#I0.ULK/256.,R2 ;UNLOCIC FUNCTION? 
90$ ;IF EQ YES 



#I0.RVB/256.,R2 

90$ 

R2 

100$ 



$LCKPR 
60$ 



.•READ VIRTUAL BLOCk? 

;IF EQ YES 

;WRITE VIRTUAL BLOCK? 

;IF NE NO 

;REF LABEL 



; PERFORM LOCK PROCESSING 
;IF CS. RETURN STATUS 



$MPPKT .'ATTEMPT VIRTUAL TO LOGICAL BLOCK MAP 

100$ ;IF CS MAP FAILURE 

RO .-ALL BLOCKS MAPPED? 

120$ ;IF EQ YES 

U.ACP(R5),R0 :GET ADDRESS OF ACP TCB 

$EXRQP ; INSURE FILE SYSTEM IS ACTIVE 

$GTPKT :G0 AGAIN 



TM075 
TM075 
1M075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 



TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 



;»*-1 



; TM075 

;»-1 



*t** D 13 ••«* 



lOSUB MACRO Ml 108 U-OEC-77 20:02 PAGE 2-9 



5U 

515 0003A6 

516 000352 

517 000356 

518 00036A 

519 000372 

520 OOOAOO 

521 OOOAOA 

522 000A12 

523 OOOAU 



5 

556 

557 0O0A16 

558 000420 

559 000424 

560 000426 

561 000426 

562 000430 

563 000432 

564 000436 

565 000442 

566 000444 

567 000446 

568 000450 

569 000452 

570 000454 



116403 
116502 
016165 
016165 
016165 
105264 
152765 
000241 



010103 
062701 
105021 

011100 
014102 
016346 
062716 
006016 
105016 
000316 
062600 
105502 
103412 



OOOOOOG 

OOOOOOG 

000024 OOOOOOG 

000026 000002G 

000030 OOOOOOG 

OOOOOOG 

OOOOOOG OOOOOOG 



000035 



000030 
000777 



120S: NOVB S.C0N(R4),R3 .GET CONTROLLER INDEX 

MOVB U.UNIT(R5),R2 ;SET PHYSICAL UNIT NUMBER 

MOV I.PRM(R1),U.UUF(R5) .'INSERT RELOCATION BIAS IN UCB 

MOV I.PRM*2(R1).U.BUF*2(R5) ; INSERT BUFFER ADDRESS IN UCB 

MOV I.PRM*4(R1),U.CNT(R5) .-INSERT BYTF COUNT IN UCB 

INCB S.STS(R4) ;SET CONTROLLER BUbr 

BISB *US.BSY.U,STS(R5) ;SET UNIT BUSY 

CLC .-INDICATE PACKET BEING RETURNED 

130$: RETURN 

**-S6LKCK-L0GICAL BLOCK CHECK ROUTINE 
**-S6LKC1-L0GICAL BLOCK CHECK ROUTINE (ALTERNATE ENTRY) 

THIS ROUTINE IS CALLED BY I/O DEVICE DRIVERS TO CHECK THE STARTING 
AND ENDiNG LOGICAL BLOCK NUMBERS OF AN I/O TRANSFER TO A FILE 
STRUCTURED DEVICE. IF THE RANGE OF BLOCKS IS NOT LEGAL. THEN SIODON 
IS ENTERED WITH A FINAL STATUS OF •'lE.BLK" AND A RETURN TO THE 
DRIVER'S INITIATOR ENTRY POINT IS EXECUTED. ELSE A RETURN TO THE 
DRIVER IS EXECUTED. 



INPUTS: 



R1=ADDRESS OF I/O PACKET. 
R5=ADDRESS OF THE UCB. 



OUTPUTS: 



IF THE CHECK FAILS. THEN »IODON IS ENTERED WITH A FINAL STATUS 
OF "lE.BLK" AND A RETURN TO THE DRIVER'S INITIATOR ENTRY POINT 
IS EXECUTED. 

IF THE CHECK SUCCEEDS, THEN THE FOLLOWING REGISTERS ARE RETURNED 
RO-LOW PART OF LOGICAL BLOCK NUMBER. 
R1=P0INTS TO I.PRM*12 (LOW PART OF USER LBN) 
R2=HIGH PART OF LOGICAL BLOCK NUMBER. 
R3i ADORE SS OF I/O PACKET. 



,IF DF RSSjP1!RSSKl1!RS$Ll1!RStM11!RS$P1l!R$SJS1!R$S611!T$$C11 



S6LKCK: 



SBLKCI: 



MOV 


R1,R3 


ADD 


*I.PRM*11.R1 


CLRB 


(R1) + 


MOV 


(RD.RO 


MOV 


-(R1),R2 


MOV 


I.PRM+4(R3). 


ADD 


#777. (SP) 


ROR 


(SP) 


CLRB 


(SP) 


SWAB 


(SP) 


ADD 


(SP)+,RO 


ADCB 


R2 


BCS 


20S 



.-SAVE ADDRESS OF I/O PACKET 
.-POINT PAST HIGH PART OF LBN 
.-CLEAR EXCESS BYTE 
.•ALTERNATE ENTRY POINT 
.-GET LOW PART OF LBN 
:GET HIGH PART OF LBN 
•(SP) .-GET NUMBER OF BYTES TO TRANSFER 
.-ROUND TO NEXT BLOCK 

; CALCULATE NUMBER OF BLOCKS IN HIGH BYTE 
.•CLEAR EXCESS BYTE 

.•CALCULATE NUMBER OF BLOCK IN TRANSFER 
; CALCULATE HIGHEST BLOCK NUMBER ♦ 1 

:tF CS ILLEGAL BLOCK NUMBER 



; PB010 

;**-1 



•••• E 13 •••♦ 



lOSUB MACRO Ml 108 U-DEC-77 20:02 PAGE 2-10 



571 000A56 

572 000A62 

573 000A6A 
57A 000466 

575 000472 

576 00047A 

577 000A76 

578 000500 

579 000502 

580 00050A 

581 000510 
582 

583 

58A 

585 

586 

587 

588 

589 

590 

591 

592 

593 

594 

595 

596 

597 

598 

599 

600 

601 

602 

603 

604 

605 

606 

607 

608 

609 

610 

611 

612 

613 0005U 

6U 000516 

615 000522 

616 000530 
617 

618 
619 
620 
621 
622 
623 
624 
625 
626 
627 



120265 
101007 
103403 
020065 
101003 
012102 
011100 

011500 
017016 
012700 



OOOOOOG 
OOOOOOG 



OOOOOOG 
OOOOOOC 



005001 
016504 
142765 
105064 





CMP8 


R2.U.CW2(R5) 




BHI 


20$ 




BLO 


10$ 




CMP 


R0,U.CW3(R5) 




BHI 


20$ 


10$: 


MOV 


(R1)+.R2 




MOV 


(RD.RO 




RETURN 




20S: 


MOV 


(R5),R0 




MOV 


aD.DSP(R0).(SP) 




MOV 


#IE.BLKR377.R0 



HIGH PART 3F LBN LEGAL' 

IF HI NO 

IF LO YES 

LOW PART OF LBN LEGAL? 

IF HI NO 

RETRIEVE HIGH PART OF LBN 

RETRIEVE LOW PART OF LBN 

GET ADDRESS OF DEVICE DCB 

REPLACE RETURN ADDRESS TO INITIATOR 

SET FINAL I/O STATUS 



.ENDC 



♦*-$10ALT-I/0 DONE (ALTERNATE ENTRY) 
**-$10D0N-I/0 DONE 

THIS ROUTINE 'S CALLED BY DEVICE DRIVERS AT THE COMPLETION OF AN I/O REQUEST 
TO DO FINAL PROCESSING. THE UNIT AND CONTROLLER ARE SET IDLE AND $IOFIN IS 
ENTERED TO FINISH THE PROCESSING. 



INPUTS: 



RO=FIRST I/O STATUS WORD. 

R1=SEC0ND I/O STATUS WORD. 

R2''STARTING AND FINAL ERROR RETRY COUNTS IF ERROR LOGGING 

DEVICE. 
R5=ADDRESS OF THE UNIT CONTROL BLOCK OF THE UNIT BEING COMPLETED. 
<SP)=RETURN ADDRESS TO DRIVER'S CALLER. 



TM095 



NOTE: IF ENTRY IS AT $IOALT. THEN R1 
SECOND STATUS WORD IS ZERO. 



IS CLEAR TO SIGNIFY THAT THE 



OUTPUTS: 



THE UNIT AND CONTROLLER ARE SET IDLE. 
R3=ADDRESS OF THE CURRENT I/O PACKET. 



$10ALT::CLR 
OOOOOOG $IODON::MOV 
OOOOOOG OOOOOOG BICB 
OOOOOOG CLRB 



R1 .-ZERO SECOND I/O STATUS WORD 

U.SCB(R5).R4 ;GET ADDRESS OF STATUS CONTROL BLOCK 
#US.BSY.U.STS(R5) .-CLEAR UNIT BUSY 
S.STS(R4) .-CLEAR CONTROLLER BUSY 



.IF DF E$$DVC 



BITB 

BEQ 

MOV 

MOV 

BEQ 

MOV 

TSTB 



#SP.EIP,S.PRI(R4) .-ERROR IN PROGRESS? 



15$ 

R1,-(SP) 

S.BMSV(R4),R1 

10$ 

RO.-(SP) 

RO 



IF EQ NO 

SAVE SECOND I/O STATUS WORD 

GET ADDRESS OF EMB 

IF EQ NONE 

SAVE FIRST I/O STATUS WORD 

SUCCESSFUL FUNCTION? 



; TM095 

;*-1 



**t« f 13 •••♦ 



lOSUB MACRO Ml 108 U-OEC-77 20:02 



628 
629 
630 
631 
632 
633 
63A 
635 
636 
637 
638 
639 
640 
641 
6A2 
6A3 
644 
645 
646 
647 
648 
649 
650 
651 
652 
653 000534 



PAGE 2- 


■11 










BPL 


5$ 






NEC 


R2 


5»: 




MOV 


R2.E.RTRV*2(R1) 






CALL 


$QEMB 






MOV 


(SP)+.RO 


10$: 




MOV 


(SP)+,R1 


15$: 









654 
655 
656 
657 
658 
659 
660 
661 
662 
663 
664 
665 
666 
667 
668 
669 
670 
671 
672 
673 
674 
675 
676 
677 
678 
679 
680 
681 
682 
683 
684 



016403 OOOOOOG 



20$: 



;IF PL YES 

; SIGNAL UNSUCCESSFUL FUNCTION 
.•SAVE FINAL ERROR RETRY COUNT 
.•QUEUE ERROR MESSAGE BLOCK 
.•RESTORE I/O STATUS WORDS 

;RE^ LABEL 



.ENDC 



,IF DF M$$EXT 



BITB 

BEQ 

BIT 

BNE 

MOV 

ADD 

CALL 

MOV 

.ENDC 



MOV 



#UC.NPR,U.CTL(R5) ;IS IT AN NPR DEVICE? 

20$ ;IF EQ NO. DOES NOT USE UMR'S 

#DV.MXD.U.CW1(R5) ;IS IT A MASSBUS DEVICE? 



20$ 

R4,R2 

#S.MPR.R2 

$DEUMR 

/r$DQUMR,-(SP) 



IF NE NO 

COPY SCB POINTER 

POINT TO MAPPING ASSIGNMENT BLOCK 

DEASSIGN ANY UMR'S 

PUSH ADDRESS TO CHECK FOR UMR WAIT 



S.PKT(RA).RS ;RETRIEVE ADDRESS OF I/O PACKET 



; TM095 



TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 



.IF DF Q$$OPT 



TST 


(R4} 


BEQ 


$IOFIN 


MOV 


R3.R4 


ADD 


#I.PRM*U.R4 


MOV 


R0.(R4) 


MOV 


R1,-{R4) 


CALL 


$FORK0 


MOV 


R4,R0 


MOV 


R5.R1 


SUB 


#I.PRM+10.R3 



.ENDC 



•♦-$IOFIN-I/0 FINISH 



ANY OTHER I/O REQUESTS TO INITIATE? 

IF EQ NO 

COPY I/O PACK:T POINTER 

POINT TO LAST WORD FOR FORK BLOCK ; TM075 

STORE I/O STATUS BLOCK CONTENTS ;**-1 

FORK HERE TO ALLOW NEXT I/O INITIATION 
RESTORE I/O STATUS BLOCK CONTENTS 

POINT TO BEGINNING Or FORK BLOCK ; TM075 

.•♦*-1 



THIS ROUTINE IS CALLED TO FINISH I/O PROCESSING IN CASES WHERE THE UNIT AND 
CONTROLLER ARE NOT TO BE DECLARED IDLE. 

INPUTS: 



; RO=riRST I/O STATUS WORD. 

I R1=SEC0ND I/O STATUS WORD. 

; R3=ADDRESS OF THE I/O REQUEST PACKET. 

I 

; OUTPUTS: 



;**-1 



**** G 13 **** 



lOSUB MACRO M1108 U-DEC-77 20:02 PAGE 2-12 



685 
686 
687 
688 
689 
690 
691 
692 
693 
694 
695 
696 
697 
698 
699 
700 
701 
702 
703 
704 

705 0005A0 

706 00054A 
707 

708 
709 
710 
711 
712 
713 
714 
715 

716 000546 

717 000550 
718 

719 

720 

721 

722 

723 

724 

725 

726 000552 

m 000556 

728 000560 

729 000564 

730 000570 
731 

732 
733 
734 
735 
736 
737 
738 
739 
740 
741 



THE FOLLOWING ACTIONS ARE PERFORMED 

1-THE FINAL I/O STATUS VALUES ARE STORED IN THE I/O STATUS BLOCK IF 
ONE WAS SPECIFIED. 



016302 000020 
001402 



2-THE I/O COUNT IS DECREMENTED AND TS.RDN IS CLEARED IN CASE 
THE TASK WAS BLOCKED FOR I/O RUNDOWN. 

3-IF 'TS.CKR' IS SET. THEN IT IS CLEARED AND CHECKPOINTING OF 
THE TASK IS INITIATED. 

4-IF AN AST SERVICE ROUTINE WAS SPECIFIED. THEN AN AST IS QUEUED 
FOR THE TASK. ELSE THE I/O PACKET IS DEALLOCATED. 

5-A SIGNIFICANT EVENT OR EQUIVALENT IS DECLARED. 

NOTE: R4 IS DESTROYED BY THIS ROUTINE. 

$IOFIN::MOV I.I0S8*4(R3) .R2 ;GET ADDRESS OF I/O STATUS BLOCK 

BEQ 10$ ;IF EQ NO I/O STATUS BLOCK SPECIFIED 



.IF DF MSSMGE 

MOV KISAR6.-(SP) ;SAVE CURRENT MAPPING 

MOV I.I0SB+2(R3).KISAR6 ;MAP TO I/O STATUS BLOCK 



TM086 
TM086 
**-3 



010022 
010112 



016301 000004 
010102 

062702 000032 

105361 000003 

042712 040000 



IDS: 



.IFTF 

MOV R0,(R2)* 
MOV R1,(R2) 

.IFT 



.-SET FINAL I/O STATUS VALUES 



MOV (SP)*,KISAR6 .-RESTORE CURRENT MAPPING 
.ENDC 



MOV 

MOV 

ADD 

DECB 

BIC 



I.TCB{R3),R1 

R1.R2 

#T.STAT,R2 

T.I0C(R1) 

#TS.RDN,(R2) 



GET ADDRESS OF TASK CONTROL BLOCK 
POINT TO FIRST TASK STATUS WORD 

DECREMENT I/O REQUEST COUNT 

FREE TASK IF I/O RUNDOWN IS IN PROGRESS 



.IF DF RSSLKL 



20$: 



MOV I.PRM+16(R3),R0 ;PICK UP LOCK BLOCK ADDRESS 
BEQ 20$ ;IF EQ THERE IS NONE 

CMP R0,*140000 ;IS IT A RELOCATED USER ADDRESS? 
BHIS 20$ ;IF HIS YES 

DEC (RO) .-FREE LOCK FOR UNLOCKING 

;REF LABEL 



TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 



**** H 13 **** 



lOSUB MACRO Ml 108 U-DEC-77 20:02 


PAGE 2-13 






7A2 




.ENDC 




; TM075 


7A3 










TM075 


7AA 










TM075 


7A5 




.IF DF 


CSSCKPtDSSISK 




746 










747 




MOV 


R3.R4 


SAVE PACKET ADDRESS 


748 




BIT 


#TS.CICR.(R2) 


CHECKPOINT REQUESTED? 


749 




BEQ 


30S 


IF EQ NO 


750 




BIC 


#TS.CKR.(R2) 


CLEAR CHECKPOINT REQUEST FLAG 


751 




CALL 


SICHKP 


INITIATE TASK CHECKPOINTING ; TM102 


752 




30S: 




REF LABEL .••*-1 


753 






• 




754 










755 




.IF OF 


DSSYNMtDSSSHF 




756 










757 




MOV 


I.TCB(R4).R1 


PICK UP ISSUING TASK'S TCB ADDRESS 


758 




MOV 


T.PCB(R1).R0 


POINT TO TASK PCB 


759 




BIT 


#PS.LIO.P.STAT(R0) ;DID SHUFFLER DETECT A LONG I/O? 1 


760 




BEQ 


35$ 


IF EQ NO 


761 




TSTB 


T.IOC(RI) 


•IS I/O COUNT NOW ZERO? 


762 




BNE 


35$ 


■IF NE NO 


763 




BIC 


#PS.LIO.P.STAT(RO) .'CLEAR LONG I/O BIT | 


764 




CALL 


$NXTSK 


•REALLOCATE PARTITION 


765 




35$: 




REF LABEL 


766 










767 




.ENDC 






768 










769 










770 
771 
772 




MOV 


R4,R3 


•RESTORE PACKET ADDRESS 




.ENDC 






771 










771, 










775 000574 


010546 


MOV 


R5,-(SP) 


•SAVE UCB ADDRESS 


TM086 


776 000576 


016305 000004 


MOV 


I.TCB(R3),R5 


•SET TCB ADDRESS 


• ♦•-5 


777 000602 


116300 000003 


MOVB 


I.EFN(R3).R0 


GET EVENT FLAG NUMBER 


**-2 


778 000606 




CALL 


$SETF 


SET THE EVENT FLAG 


TM086 


779 000612 


010300 


MOV 


R3.R0 


COPY I/O PACKET ADDRESS 


TM086 


780 










•«-6 


781 










782 
783 
784 




.IF DF 


A$$TRP 






TST 


(R3)* 


•POINT TO SECOND WORD 


785 




NOV 


#I.LGTH,(R3)* 


INSERT LENGTH OF BLOCK IN BYTES 


786 




MOV 


#8.*2,(R3)* 


SET NUMPPR OF BYTES TO ALLOCATE ON USER STACK 


787 




MOV 


I.AST(R0).{R3)* 


INSERT AST ADDRESS 


788 




BEQ 


70$ 


IF EQ NONE SPECIFIED 


789 




MOV 


#1.(R3)* 


INSERT NUMBER OF AST PARAMETERS 


/W 




MOV 


I.IOS6(R0),(R3) 


•INSERT VIRTUAL ADDRESS OF I/O STATUS BLOCK 


791 




MOV 


RO.RI 


COPY ADDRESS OF I/O PACKET 


792 




MOV 


R5.R0 


CALCULATE ADDRESS OF AST LISTHEAO 


793 




ADD 


#T.ASTL,RO 




794 




CALL 


$QINSF 


INSERT AST IN QUEUE 


795 




MOV 


R5,R0 


COPY TCB ADDRESS ; TM086 


796 




CALL 


$SETCR 


SET A SCHEDULE REQUEST FOR THE TASK ; TM086 


797 




W 


80$ 




798 











•••• I 13 **** 



lOSUB MACRO Ml 108 U-DEC-77 20:02 PAGE 2-^^ 



799 
800 
801 

802 0006U 

803 000620 

804 000622 
805 

806 
807 
808 
809 
810 
811 
812 
813 
81A 
815 
816 
817 
818 
819 
820 
821 
822 
823 
824 
825 

826 00062A 

827 000630 

828 000634 

829 000640 

830 000642 

831 000650 

832 000652 

833 000654 

834 000656 

835 000660 

836 000662 

837 000666 

838 000670 

839 000674 

840 000676 
000700 
000702 

843 000706 

844 000712 

845 000716 

846 000722 

847 000724 

848 000732 
8<>9 000734 

850 000740 

851 000742 

852 000746 
853 

854 
855 



841 
842 



012605 



016504 
016701 
005765 
100004 
132765 
001425 
010403 
010302 
011203 
001421 
020163 
001372 
020563 
001367 
011312 
001002 
010264 
012700 
005063 

000740 
132765 
001003 
105765 
100016 
016400 
011502 



.ENDC 



70S: 
80$: 



CALL 

MOV 

RETURN 



SDEPKT 
(SP)+.R5 



DEALLOCATE I/O PACKET 
RESTORE UCB ADDRESS 



TM086 
TM086 
•*-3 



••-$10KIL-I/0 KILL 



THIS ROUTINE IS CALLED TO FLUSH ALL I/O REQUESTS FOR THE CURRENT TASK FROM 
A DEVICE QUEUE AND TO CANCEL THE CURRENT I/O OPERATION IN PROGRESS IF IT 
IS ALSO FOR THE CURRENT TASK. 

INPUTS: 

R5=ADDRESS OF THE UCB OF THE DEVICE TO FLUSH REQUESTS FOR. 

OUTPUTS: 

IF THE SPECIFIED DEVICE IS NOT FILE STRUCTURED. THEN THE I/O RE- 
REQUEST QUEUE IS FLUSHED AND THE CURRENT I/O OPERATION IN PROGRESS 
IS CANCELLED. 

NOTE: R4 IS DESTROYED BY THIS ROUTINE. 



OOOOOOG 
OOOOOOG 
OOOOOOG 

OOOOOOG OOOOOOG 



SIOKIL: 



10S: 
20S: 



000004 
000010 



000002 

OOOOOOC 

000022 



30S: 



OOOOOOG OOOOOOG 40$: 

OOOOOOG 

OOOOOOG 4 St: 



:MOV U.SCB(RS>,R4 

MOV STKTCB.R1 

TST U.CWKRS) 

BPL 10S 

BITB «US.MNT.U.STS(R5) 

BEQ 40S 

MOV R4.R3 

MOV R3,R2 

MOV (R2) ,R3 

BEQ 40S 

CMP R1.I.TCB(R3) 

BNE 20S 

CMP R5.I.UCB(R3) 

BNE 20S 

MOV (R3),(R2) 

BNE 30S 

MOV R2,2.N4; 

MOV flE ABO(377.R0 

CLR I./iT(R3) 

CALL SrjFIN 

BR S ; OK I L 

BITB #t:.KIL.U.CTL(R55 

BNE 45 ( 

TSTB U..TS(R5) 

BPL 50S 

MOV S.PK (R4).R0 

MOV (R5) R2 



,IF OF LtSDRVlMSSMGE 



GET ADDRESS OF SCB 

GET TC9 ADDRESS OF CURRENT TASK 

DEVICE-UNIT MOUNTABLE? 

IF PL NO 

.•DEVICE-UNIT MOUNTED? 
IF EQ YES 

COPY ADDRESS OF I/O QUEUE LISTHEAO 
SAVE ADDRESS OF CURRENT ENTRY 
GET ADDRESS OF NEXT ENTRY 
IF EQ END OF LIST 
REQUEST FOR CURRENT TASK? 
IF NE NO 

REQUEST FOR SPECIFIED UCB? 
IF NE NO 
CI'—! UP LIST 
I^ .c NO NEW LAST 
SET ADDRESS OF NEW LAST 
SET FINAL STATUS TO ABORT 
MAKE SURE THERE IS NO AST DECLARED 
FINISH I/O REQUEST 
GO AGAIN 

;CALL DRIVER REGARDLESS OF ACTIVITY? 
IF NE YES 
UNIT BUSY? 
IF PL NO 

GET ADDRESS OF CURRENT I/O PACKET 
RETRIEVE ADDRESS OF DEVICE CONTROL BLOCK 



•••• J 15 *••• 



lOSUB MACRO mi 08 U-OEC-77 20:02 PAGE 2-15 



856 

857 m\l ICISAR5.-(SP) 

B58 MOV D.PCB(R2),R3 

859 BEQ A7S 

860 WV 

861 ATI: 
862 

863 .IFTF 

86A 

865 000750 016202 OOOOOOG MOV 

866 

867 .IFT 

868 

869 KQ 49S 

870 

871 .IFTF 

872 

873 00075A 116403 OOOOOOo BOVB 

874 
875 
876 
877 
878 
879 
880 
881 
882 
883 
884 

885 000760 MTPS 

886 000766 CALL 

887 000772 «TPS 
888 

889 .IFT 

890 

891 49$: MOV 

892 

893 .ENOC 

894 
895 

896 000776 50$: RETURN 

897 
898 
809 
900 
901 
902 
903 
904 
905 
906 
907 
908 
909 
910 
911 
912 



SAVE APR5 

GET DRIVER PCB ADDRESS 

IF EQ DRIVER IS PART OF EXEC 



P.REL(R3).ICISAR5 ;«AP THE DRIVER 



D.DSP(R2).R2 ;6ET ADDRESS OF DRIVER DISPATCH TABLE 



IF EO DRIVER IS UNLOADED 



S.C0N(R4).R3 ;GET CONTROLLER INDEX 



T«081 
TM081 
T««I081 
TH081 
Tn081 
TPWB1 
Tn081 



CALL DRIVER AT CANCEL I/O OPERATION ENTRV POINT WITH THE ARGUMENTS: 

RO-ADDRESS OF THE CURRENT I/O PACKET. 
RUADDRESS OF THE TCB OF THE CURRENT TASK. 
R3-C0NTROLLER INDEX. 

R4rA0DRESS OF THE STATUS CONTROL BLOCK. 
RS-ADDRESS OF THE UNIT CONTROL BLOCK. 



S.PRI(R4) 

aD.VCAN(R2) 

*0 



(SP)»,KISAR5 



;;LOCK OUT DEVICE INTERRUPTS 
;; CANCEL CURRENT REQUEST 
;; ALLOW DEVICE INTERRUPTS 



; WE STORE APR5 



; Tn081 
.••-1 



••-$MPLNe-r!V> LOGICAL UNIT NUMBER FOR EXIT 
**-$MPLUN-MAP LOGICAL UNIT NUMBER 

THIS ROUTINE IS CALLED TO VALIDATE A LOGICAL UNIT NUMBER (LUN) AND TO MAP 
THE LUN INTO A UCB POINTER. IF AN ILLEGAL LUN IS SPECIFIED. THEN A 
DIRECTIVE STATUS OF 'D.RS96' IS RETURNED. ELSE THE LUN IS MAPPED AND A 
POINTER TO THE LUN AND UCB ARE RETURNED TO THE CALLER. 



INPUTS: 



R3<ADDRESS OF THE LUN. 

R4:ADDRESS OF THE HEADER OF THE CURRENT TASK. 

R5=ADDRESS OF THE TCB OF THE CURRENT TASK. 



*••• K 13 •••• 



lOSUB MACRO mi08 U-DEC-77 20:02 PAGE 2-16 



913 
91 A 
915 
916 
917 
918 
919 
920 
921 
922 
923 
92A 

925 001000 

926 001002 

927 001 OOA 

928 001006 

929 001010 

930 001 OU 

931 001016 

932 001020 

933 001022 
93A 001 02A 

935 001030 

936 001032 

937 001 03A 

938 001036 

939 001 0A2 
9A0 001 OAA 
941 001050 
9A2 001052 

943 00^054 

944 001062 

945 001064 

946 001070 

947 001072 

948 001074 

949 001076 
950 

951 
952 
953 
954 
955 
956 
957 
958 
959 
960 
961 
962 
963 
964 
965 
966 
967 
968 
969 



005001 
152301 
005203 
005301 
020164 
103030 
006301 
006301 
060401 
062701 
000261 
012100 
001417 
020060 
001403 
016000 
000772 
011002 
022762 
001003 
016500 
000762 
000241 



OUTPUTS: 



000074 

000076 

OOOOOOG 
OOOOOOG 

044524 
000026 



OOOOOOG 



C=1 IF NO DEVICE IS ASSIGNED TO THE SPECIFIED LUN. 

R0=0. 
C=0 IF A DEVICE IS ASSIGNED TO THE SPECIFIED LUN. 

R0=ADDRESS OF THE UCB OF THE ASSIGNED DEVICE. 

IN EITHER CASE R1 IS RETURNED AS THE ADDRESS OF THE SECOND LUN 
WORD IN THE TASK HEADER AND R3 IS ADVANCED BY 2. 



GET LOGICAL UNIT NUMBER 

POINT TO NEXT WORD 
BACK OFF LJN BY 1 
LEGAL LUN? 
IF HIS NO 
MULTIPLY LUN-1 BY 4 

CALCULATE ADDRESS OF FIRST LUN WORD 

IN TASK HEADER 

ASSUME LUN NOT ASSIGNED 

GET POINTER TO DEVICE UCB 

IF EQ NO DEVICE ASSIGNED 

IS DEVICE REDIRECTED? 

IF EQ NO 

GET POINTER TO REDIRECT UCB 

TRY 4GMN 

GET ADDRESS OF DEVICE DCB 

TERMINAL INPUT PSEUOO DEVICE? 

IF NE NO 

GET ADDRESS OF "Tl" UCB 

INDICATE DEVICE ASSIGNED 

SET DIRECTIVE STATUS 



**-SMPPHY-MAP TO PHYSICAL ADDRESS 

THIS ROUTINE IS CALLED TO MAP A RELOCATION BIAS AND DISPLACEMENT ADDRESS TO AN 
18 BIT PHYSICAL ADDRESS. IF THE INDICATED DEVICE IS NOT AN NPR AN DEVICE. 
THEN THE RELOCATION BIAS AND DISPLACEMENT ADDRESS ARE RETURNED TO THE CALLER. 
ELSE THE RELOCATION BIAS AND DISPLACEMENT ADDRESS ARE CONVERTED TO AN 18 BIT 
PHYSICAL ADDRESS WHICH IS RETURNED TO THE CALLER. 

INPUTS: 

R1>REL0CATI0N BIAS. 

R2=DISPLACEMENT ADDRESS. 

R5sADDRESS OF THE UNIT CONTROL BLOCK. 

OUTPUTS: 

IF DEVICE IS AN NPR DEVICE ON AN 18-91 T MACHINE. THEN ; TM086 





.ENABL 


LSB 


SMPLUN: 


:CLR 


R1 




BISB 


(R3)*.R1 




INC 


R3 




Die 


R1 




CMP 


R1.H.NLUN(R4) 




BHIS 


40S 


SMPLNE: 


:ASL 


R1 






R1 




sss 


S^4.R1 




fH.NLUN«2,R1 




SIC 






MOV 


(RDt.RO 




BEQ 


30$ 


SMPLNO: 


:CM» 


RO.U.RED(RO) 




dtsi 


10$ 




MOV 


U.RED(R0),R0 




BR 


$MPLND 


10S: 


MOV 


(RO) .R2 




CMP 


r7I.D.NAM(R2) 




S£ 


20$ 
T.UCB(R5).R0 




Bft 


$MPLND 


20S: 


CLC 




30S: 


RETURN 




40$: 


DRSTS 


D.RS96 




.DSABL 


LSB 



•••• L IS ••♦• 



lOSUB MACRO mi08 1A-0EC-77 20:02 PAGE 2-17 



970 

971 

972 

973 

97A 

975 

976 

977 

978 

979 

980 

981 

982 

983 

984 

985 

986 

987 

988 

989 

990 

991 

992 

993 

99A 

995 

996 

997 

998 

999 

1000 

1001 

1002 

1003 

1004 

1005 

1006 

1007 

1008 

1009 

1010 

1011 

1012 

1013 

10U 

1015 

1016 

1017 

1018 

1019 

1020 

1021 

1022 

1023 

1024 

1025 

1026 



R1=HI6H ORDER 2 BITS OF PHYSICAL ADDRESS IN BITS 4 AND 5;**-1 
R2=L0W ORDER 16 BITS OF PHYSICAL ADDRESS. 



VfPHr: 



lOtt 



IF DEVICE IS AN NPR DEVICE ON AN 11/70. THEN 

R1=HIGH ORDER 6 BITS OF PHYSICAL ADDRESS !N HIGH BYTE. 

R2=L0U ORDER 16 BITS OF PHYSICAL ADDRESS. 
IF DEVICE IS NOT AN NPR DEVICE. THEN 

m=RELOCATION BIAS. 

R2=DISPLACENENT ADDRESS. 

RO AND R3 ARE PRESERVED ACROSS CALL. 



#UC.NPR.U.CTL(R5) ;NPR DEVICE? 
IF EQ NO 
REMOVE APR6 BIAS FROM DISPLACEMENT 



TM086 
TM086 
TM086 



.IF DF 


MtSMGE 


BITS 


#UC.NPI 


UEQ 


^0$ 


^ 


& 


CLC 




ROR 


Ri 


R0R6 


fi2 


ASR 


R1 


RORB 


R2 


SWAB 


R2 


BISB 


R1.R2 


SWAB 


R2 


CLRB 


R1 


.IF NDF 


MSSEXT 


i8 


H 


All 
ASS 


R1 


.ENDC 




RETURN 




.ENDC 





GET 2 BITS OF RELOCATION BIAS 

TO FILL 8 LOW ORDER BITS OF ADDRESS 



SWAP TO COLLECT 8 MORE BITS 
INSERT UPPER 8 BITS OF ADDRESS 
SWAP BACK TO REAL ADDRESS 
CLEAR LOW BYTE OF LIPPER BITS 



SHIFT BITS 17 AND 18 OF ADDRESS 
INTO BITS 4 AND 5 



••-$MPPKT-MAP I/O PACKET FUNCTION 

THIS ROUTINE IS CALLED TO MAP A READ/WRITE VIRTUAL FUNCTION IN AN I/O PACKET 
TO A READ/WRITE LOGICAL FUNCTION. IF THE CURRENT WINDOW DOES NOT MAP THE VIRTU 
FUNCTION, THEN A FAILURE INDICATION IS RETURNED. ELSE IF THE WINDOW COMPLETELY 
MAPS THE VIRTUAL FUNCTION, THEN THE LOGICAL BLOCK NUMBER IS SCORED IN THE I/O 
PACKET AND THE READ/WRITE VIRTUAL FUNCTION IS CONVERTED TO ITS LOGICAL COUNTER 
PART. FLSE THE PARTIAL MAPPING RESULTS ARE RETURNED TO THE CALLER. 

INPUTS: 



•**• n 13 Alt* 



1 A^k^l^ 



lOSUB MACRO mi08 K-OEC-77 20:02 PAGE 2-18 



1027 
1028 
1029 
1030 
1031 
1032 
1033 
103A 
1035 
1036 
1037 
1038 
1039 
lO-O 
10A1 
10A2 
10A3 
10A4 
10A5 
10A6 
10A7 
1048 
10A9 
1050 
1051 
1052 
1053 
105A 
1055 
1056 
1057 
1058 
1059 
1060 
1061 
1062 
1063 
106A 
1065 
1066 
1067 
1068 
1069 
1070 
1071 
1072 
1073 
1074 
1075 
1076 
1077 
1078 
1079 
1080 
1081 
1032 
1083 



R1=ADDRESS OF THE I/O PACKET. 



OUTPUTS: 



C=1 IF MAPPING FAILURE. 
C=0 IF MAPPING WAS SUCCESSFUL. 
IF RO EQ 0, THEN 

I .FCNtI (R1 )=IO.WLB/IO.RLB. 

I.PRH»10(R1)=HIGH PART OF MAPPED LBN. 

I.PRH*12(R1)=L0W PART OF MAPPED LBN.. 



ELSE 



R0=NUMBER OF BLOCKS NOT MAPPED. 
R2=HIGH PART OF MAPPED I BN. 
R3=L0W PART OF MAPPED LdN. 



R1 IS PRESERVED ACROSS CALL. 



.IF DF A»$CPS 



$MPPKT::MOV 


I.PRM*12(R1>.R3 


MOV 


I.PRM*10(R1),R2 


MOV 


R1,-(SP) 


ffi! 


I.PRM»4(R1).R0 


ai.LN2(R1}.R1 


BIC 


#1,R1 


CALL 


SMPVBN 


MOV 


(SP)*.R1 


BCS 


20$ 


TST 


;. 


MOVB 


R2.I.PRM+10(R1) 


MOV 


R3.1.PRM*12(R1) 


MOV 


*IO.WLB.-(SP) 


CMPB 


#I0.WVB/256.,I.F 


BEQ 


10S 


INCB 


KSP) 


lOtt MOV 


(SP)*.I.FCN(R1) 


.IF DF 


MSSMGE 


HAV 


R1.R3 


jlSy 


I.PRM(R3).R1 


MOV 


I.PRM»2(RS).R2 


CALL 


SMPPHY 


MOV 


R1.1.PRM(R3) 


^ 


R2.I.PRM*2(R3) 


R3.R1 



PICKUP LOU PART OF VBN 

PICKUP HIGH PART OF VBN 

SAVE I/O PACKET ADDRESS 

GET LENGTH OF TRANSFER IN BYTES 

GET ADDRESS OF WINDOW BLOCK 

MAKE SURE LOW BIT OF ADDRESS IS ZERO 

MAP VIRTUAL BLOCK NUMBER 

RETRIEVE I/O PACKET ADDRESS 

IF CS MAPPING FAILURE 

REQUEST COMPLETELY MAPPED? 

IF NE NO 

SET HIGH PART OF LBN 

SET LOW PART OF LBN 

ASSUME WRITE LOGICAL FUNCTION 
CN*1(R1) .'WRITE VIRTUAL FUNCTION? 
.IF EQ YES 

; CONVERT TO READ LOGICAL FUNCTION 
.-SET NEW FUNCTION CODE 



;SAVE I/O PACKET ADDRESS 

.GET RELOCATION BIAS 

.•GET DISPLACEMENT ADDRESS 

.•HAP TO 18 BIT PHYSICAL ADDRESS 

.•INSERT 18 BIT PHYSICAL ADDRESS BACK 

.•l^TO I/O PACKET 

;RESTORE 1/0 PACKET ADDRESS 

.'MAKE SURE CARRY IS CLEAR 



20li 



.ENDC 



RE TURN 



**** N 13 **** 



lOSUB MACRO Ml 108 U-DEC-77 20:02 PAGE 2-19 



108A 

085 

1086 

087 

088 

1089 

1090 

1091 



1100 



11^ 



*»-$«PUB«-MAP UNIBUS TO MEMORY 

THIS ROUTINE IS CALI ED BY UNIBUS NPR DEVICE DRIVERS TO LOAD THE 
NECESSARY UNIBUS MAF REGISTERS TO EFFECT A TRANSFER TO MAIN MEM- 
ORY ON AN 11/70 PROCESSOR WITH EXTENDED MEMORY. 



INPUTS: 



RA-ADDRESS OF DEVICE SCB. 
R5=ADDRESS OF DEVICE UCB. 

OUTPUTS: 

THE UNIBUS MAP REGISTERS NECESSARY TO EFFECT THE 
ARE LOADED. 

NOTE: REGISTER R3 IS PRESERVED ACROSS CALL. 



TRANSFER 



.IF DF MSiEXTlMSSMGE 



SMPUBM: 



10$: 



:MOV 
MOV 
MOVE 
MOV 
MOV 
MOV 
ADD 
ADC 
SUB 
BGT 
TST 
RETURN 

.ENDC 



S.MPR^M.UMRA(R4).R0 :GET ADDRES". OF FIRS1 MAP REGISTER 
S.MPR*M.UMRN(RA),-(SP) .SET COUNT OF REGISTERS TO LOAD 
S.MF>R«M.BFVH(RA).R1 ;GET HIGH 6 BITS OF ADDRESS 



S.MPR«M.BFVL(RA).R2 :GET LOW 16 BITS 



R2,(R0)' 

R1.(R0)+ 

<r20000,Rc 

R1 

#«,(SP) 

10S 

(SP)* 



.•LOAD LOW 16 BITS OF 
.-LOAD HIGH 6 BITS OF 
.•ADVANCE 8K BYTES 



OF ADDRESS 

ADDRESS 

ADDRESS 



:ALL REGISTERS LOADED? 
;IF 6T NO 
; CLEAN STACK 



TM095 
TM095 
TM095 
1M095 



TM095 
»*-1 



••-$MPVBN-MAP VIRTUAL BLOCK NUMBER 

THIS ROUTINE IS CALLED TO MAP A VIRTUAL BLOCK NUMBER (VBN) TO A LOGICAL BLOCK 
NUMBER (LBN) VIA A WINDOW BLOCK THAT CONTAINS A SET OF MAPPING POINTERS. 



INPUTS: 



RO'NUMBER OF CONSECUTIVE BYTES THAT MUST BE MAPPED. 
R1 -ADDRESS OF THE WINDOW BLOCK. 
R2'HIGH PART OF VBN. 
R3'L0W PART OF VBN. 



-UTPUTS: 



C>1 IF VBN CANNOT BE MAPPED VIA WINDOW BLOCK. 
C«0 IF VBN SUCCfcSSFULLY MAPPED TO LBN. 
RO^NUMBER OF UNMAPPED BLOCKS. 



••*• B 14 **•« 



**** B 14 **** 



lOSUB MACRO Ml 108 1A-DEC-77 20:02 PAGE 2-20 



11A1 
1U2 
1143 
1UA 
1U5 
1146 
1147 
1148 
1149 
1150 
1151 
1152 
1153 
1154 
1155 
1156 
1157 
1158 
1159 
1160 
1161 
1162 
1163 
1164 
1165 
1166 
1167 
1168 
1169 
1170 
1171 
1172 
1173 
1174 
1175 
1176 
V77 
11 78 
1179 
1180 
1181 
1182 
1183 
1184 
1185 
1186 
1187 
1188 
1189 
1190 
1191 
1192 
1193 
1194 
1195 
1196 
1197 



R2=HIGH PART OF LBN. 
R3=L0W PART OF LBN. 



SnPVBN::SAVNR 
MOVB 
BEQ 
ADD 
ROR 
CLRB 
SWAB 
INC 
CLR 
BISB 
INC 
SUB 
BLO 
SUB 
SBC 
BNE 
TST 

10$: TST 
CLR 
BISB 
CLR 
BISB 
CMP 
BHIS 
SUB 
DEC 
DECB 
BGT 

20S: SEC 
BR 

30$: MOV 
ADD 
ADD 
ADC 
ADD 

40$: INC 
SUB 
BLE 
DECB 
BLE 
ADD 
ADC 
CMPB 
BNE 
CLR 
MOVB 
CMP 
BEO 
BR 

50$: CLR 

60$: TST 

70$: INC 

RETURN 



(R1)+.-(SP) 

20$ 

11777, m 

RO 

RO 

RO 

R1 

R4 

(R1)*.R4 

R1 

R4,R2 

20$ 

(R1)*.R3 

R2 

20$ 

(R1) + 

(R1)» 

R4 

(R1)+,R4 

-(SP) 

(R1)+.(SP) 

(SP).R3 

30$ 

(SP)+.R3 

R3 

(SP) 

10$ 

70$ 

(R1)*.R5 

R3.R0 

R5.R3 

R2 

R4 R2 

(SP) 

(SP).RO 

50$ 

2(SP) 

60$ 

(SP),R5 

R4 

R4,(R1)+ 

60$ 

(SP) 

(R1)*,(SP) 

R5,(R1/+ 

40$ 

60$ 

RO 

(SP)* 

(SP) + 



SAVE NONVOLATILE REGISTERS 

GET NUMBER OF HAPPING POINTERS 

IF EQ NO MAP POSSIBLE 

ROUND BYTES TO NEXT 256. WORD BLOCK 

CONVERT TO WORDS 

CLEAR RESIDUAL BITS 

SWAP NUMBER OF BLOCKS TO LOW BYTE 

POINT TO HIGH PART OF STARTING VBN 

PICKUP HIGH PART OF STARTING VBN 

STEP OVER STATUS BYTE 
NORMALIZE HIGH PART OF VBN 
IF LO MAP FAILURE 
NORMALIZE LOW PART OF VBN 

IF NE MAP FAILURE .^. 

ADVANCE PAST LOCK LIST POINTER ; TM075 
POINT TO NEXT MAPPING POINTER 
PICKUP HIGH PART OF LBN 

PICKUP POINTER SIZE MINUS ONE 

VBN MAPPED BY THIS POINTER? 

IF HIS YES 

NORMALIZE VBN FOR THIS POINTER 

ANY POINTERS LEFT? 

IF GT YES 

INDICATE MAPPING FAILURE 

PICKUP LOW PART OF LBN 

CALCULATE CONTIGUOUS BLOCKS REQUIRED 

CONVERT VBN TO LBN 



CORRECT TO ACTUAL POINTER SIZE 

REDUCE CONTIGUOUS BLOCKS REQUIRED 

IF LE CONTIGUOUS REQUIREMENT SATISFIED 

ANY MORE POINTERS? 

IF LE NO 

CALCULATE NEXT LBN 

HIGH PART OF LBN MATCH? 

IF NE NO 

CLEAR HIGH PART OF COUNT 

PICKUP POINTER SIZE MINUS ONE 

LOW PART OF LBN MATCH? 

IF EQ YES 

INDICATE TOTAL MAP 

CLEAN STACK AND INDICATE SUCCESS 

CLEAN STACK 



*••* c 14 **** 



•««• g ^If ••*• 



lOSUB MACRO mi 08 U-DEC-77 20:02 PAGE 2-21 



1198 
1199 
1200 
1201 
1202 
1203 
120A 
1205 
1206 
1207 
1208 
1209 
1210 
1211 
1212 
1213 
121A 
1215 
1216 
1217 
1218 
1219 
1220 
1221 
1222 
1223 
122A 
1225 
1226 
1227 
1228 
1229 
1230 
1231 
1232 
1233 
123A 
1235 
1236 
1237 
1238 
1239 
12A0 
12A1 
12A2 
1243 
124A 
12A5 
12A6 
^^A7 
1248 
1249 
1250 
1251 
1252 
1253 
1254 



.ENDC 



♦*-$LCKPR-L0CK PROCESSING ROUTINE 

THIS ROUTINE FIRST DETERMINES IF A FILE I/O REQUEST IS TO A SHARED 
FILE. IF SO. IT DETERMINES IF THC REQUEST IS AN UNLOCK QIO OR A 
VIRTUAL BLOCK I/O REQUEST. IT THEN EITHER PERFORMS THE UNLOCK QIO 
OR THE LOCK PROCESSING RESPECTIVELY. 

INPUTS: 

R1=I/0 PACKET ADDRESS OF THE REQUEST 
OUTPUTS: 

C=0 IF NO LOCK PROCESSING WAS REQUIRED. 

C=1 IF AN UNLOCK WAS PERFORMED OR AN ERROR CONDITION OCCURED 
DURING THE LOCK PROCESSING. 
R0=I/O STATUS 

R1 IS PRESERVED. 



.IF DF RSSLKL 



SLCKPR: 



:MOV 


ai.LN2{R1),R3 


.•POINT TO WINDOW BLOCK 


BIC 


#1,R3 


; CLEAR INTERLOCK BIT 


MOV 


*IE.ULKft377.R0 


;SET FOR UNLOCK ERROR STATUS 


MOV 


W.LKL(R3),R2 


; POINT TO FIRST ENTRY IN LOCK LIST 


BEQ 


50$ 


:IF EQ THERE IS NONE 


SAVNR 




.'SAVE R4 AND R5 


MOV 


I.PRM+4(R1).R4 


;PICK UP BYTE COUNT FOR REQUEST 


ADD 


*777,R4 


; ROUND TO NEXT DISK BLOCK 


ROR 


R4 


.•CONVERT TO SIZE IN BLOCKS 


CLRB 


R4 




SWAB 


R4 




CMPB 


I.FCN*1(R1),#IO.ULK/256. ;IS THIS AN UNLOCK REQUEST? 


BNE 


100S 


;IF NE NO 



UNLOCK PROCESSING 

THIS SECTION OF THE ROUTINE PERFORMS THE UNLOCK PROCESSING. 
REGISTER CONTENTS AT THIS POINT ARE: 

ROsUNLOCK ERROR STATUS 

R1=I/0 PACKET ADDRESS 

R2=ADDRESS OF THE FIRST LOCK BLOCK IN THE LOCK LIST 

R3»P0INTER TO CURRENT WINDOW 

R4sByTE COUNT OF CURRENT UNLOCK REQUEST 



RELEVANT 



TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
1M075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 



«••• 14 ••*« 



lOSUB MACRO Ml 108 lA-DEC-77 20:0? 



1255 
1256 
1257 
1258 
1259 
1260 
1261 
1262 
Uu3 
126A 
1265 
1266 
12o7 
1268 
1269 
1270 
1271 
1272 
1273 
1274 
1275 
1276 
1277 
1278 
1279 
1280 
1281 
1282 
1283 
1284 
1285 
1286 
1287 
1288 
1289 
1290 
1291 
1292 
1293 
129A 
1295 
1296 
1297 
1298 
1299 
1300 
1301 
1302 
1303 
130A 
1305 
1306 
1307 
1308 
1309 
1310 
1311 



GE 2-22 








MOV 


I.PRM+12(R1),R5 




BISB 


I.PRM*10(R1).R5 


10$: 


TSTB 


L.CNT(R2) 




BEQ 


A0$ 




TST 


R5 




BEQ 


20$ 




CALL 


180$ 




BNE 


A0$ 


20$: 


CMP 


L.UI1(R2).R3 




BNE 


40$ 




CLRB 


L.CNT(R2) 




MOV 


/HS,SUC8377,R0 




TST 


R5 




BNE 


50$ 


A0$: 


MCV 
BNE 


(R2).R2 
10$ 



CREATE BLOCK NUMBER SPECIFIED FLAG 

THIS LOCK BLOCK IN USE? 

IF EO NO 

BLOCK NUMBER SPECIFIED? 

IF EQ MO 

EXACT VBN AND COUNT MATCH? 

IF NE NO 

SAME OWNER? 

IF NE NO 

UNLOCK THE LOCK 

SET FOR SUCCESSFUL RETURN 

WAS THIS FOR AN EXPLICIT BLOCK NUMBER? 

IF NE YES 

POINT TO NEXT LOCK BLOCK 

IF NE THERE IS ONE 



NO LOCK LIST EXISTS 

IF THE FUNCTION IS NOT AN UNLOCK FUNCTION, A SIMPLE RETURN OCCURS 
WITH CARRY CLEAR. AN UNLOCK IN THIS CASE IS AN ERROR. (NOTE THAT 
ALL UNLOCK REQUESTS FALL THROUGH HERE AS WELL.) 



50$: 



CMP6 
RETURN 



I.FCN*1(R1).#<I0.ULK/256.>+1 ;SET CARRY IF UNi OCK 



LOCK PROCESSING 

THIS ROUTINE CHECKS FOR ATTEMPTED LOCK OVERLAPS. ATTEMPTS TO SET THE 
NEW LOCK, AND PERFORMS THE IMPLIED UNLOCK. IF A NEW LOCK REQUEST 
FOR AN EXPLICIT UNLOCKER IS DETECTED WHICH EXACTLY MATCHES AN EXISTING 
LOCK FOR THAT WINDOW IN BOTH STARTING VBN AND SIZE, THE LOCK BLOCK IS 
SIMPLY REUSED. RELEVANT REGISTER CONTENTS AT THIS POINT ARE: 

R1=I/0 PACKET ADDRESS 

R2=ADDRESS OF FIRST LOCK BLOCK IN LOCK LIST 

R3=ADDRESS OF FILE WINDOW 

R4=BL0CK COUNT FOR CURRENT REQUEST 



INIT FREE NODE POINTER 
;PUSH LOCK ERROR STATUS 
IS LOCK BLOCK IN USE? 
IF NE YES 

ALREADY HAVE FREE BLOCK? 
IF NE YES, LOOK AT NEXT LOCK BLOCK 
ELSE CLAIM THIS BLOCK 
PICK UP OWNER WORD 
CLEAR BIT FOR NO UNLOCK FLAG 
LOCK BELONG TO THIS WINDOW? 
IF NE NO, CHECK FOR OVERLAPS 
EXPLICIT UNLOCKER? 

IF EQ NO, SAVE BLOCK FOR IMPLIED UNLOCK 
EXACT VBN AND COUNT? 



100$: 


CLR 


R5 




MOV 


#IE.LCKt377.-(SP 


110$: 


TSTB 


L.CNT{R2) 




BNE 


120$ 




TST 


R5 




BNE 


150$ 




BR 


130$ 


120$: 


MOV 


L.WI1(R2),R0 




BIC 


f1,R0 




CMP 


R0.R3 




BNE 


140$ 




BIT 


/rWI.EXL.(R3) 




BEQ 


125$ 




CALL 


180$ 



TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
1M075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 



••t* E 14 ««•• 



lOSUB MACRO M1108 U-DEC-77 20:02 PAGE 2-23 



1312 

1313 

'31A 

1^15 

13i6 

1317 

1318 

1319 

1320 

1321 

1322 

1323 

132A 

1325 

1326 

1327 

1328 

1329 

1330 

1331 

1332 

1333 

133A 

1335 

1336 

1337 

1338 

1339 

1340 

13A1 

13A2 

13A3 

134A 

1345 

1346 

1347 

1348 

1349 

1350 

1351 

1352 

1353 

1354 

1355 

1356 

1357 

1358 

1359 

1360 

1361 

1362 

1363 

1364 

1365 

1366 

1367 

1368 



125S: 

130$: 
140S: 



145$: 



146$: 
150$: 



160$: 



170$: 



BNE 

MOV 

ROR 

BCS 

MOV 

BR 

CLR 

BISB 

ADD 

MOVE 

ADCB 

CMPB 

BNE 

CMP 

BHIS 

MOV 

ADD 

MOVB 

ADCB 

CMPB 

BNE 

CMP 

BLO 

MOV 

BNE 

CLC 

BIT 

BEQ 

MOV 

BNE 

MOV 

MOV 

MOV 

CALL 

MOV 

BCS 

MOV 

MOV 

TST 

MOV 

MOV 

INC 

MOVB 

MOVB 

MOV 

MOV 

RETURN 



150$ 

L.UI1(R2),R0 

RO 

170$ 

R2.R5 

150$ 

RO 

L.CNT(R2),R0 

L.VB1*2(R2),R0 

L.VB1(R2),-(SP) 

(SP) 



:IF NE NO 

.■RETRIEVE OWNER WORD 

;CAN LOCK BLOCK BE REUSED? 

* IF CS NO 

•SET TO REUSE THIS LOCK BLOCK 

.•LOOK AT NEXT LOCK BLOCK 

;PICK UP LOCK BLOCK COUNT 



.•CALCULATE NUMBER OF HIGHEST BLOCK +1 

.'PUSH HIGH ORDER BVTE 

.•PROPAGATE CARRY 
I.PRM-»10(R1).(SP>* .-OVERLAP? 
145$ :IF NE USE BRANCH BELOW 

I.PRM*12(R1),R0 .-OVERLAP? 
150$ .•IF HIS NO 

RA.RO ;COPY SIZE OF CURRENT REQUEST 

I.PRM*12{R1),R0 .•CALCULATE NUMBER OF HIGHEST BLOCK +1 
I.PRMt10(R1>.-(SP) ;PUSH HIGH ORDER BYTE 
(SP) ; PROPAGATE CARRY 

L.VB1(R2),(SP)* ;OVERLAP? 
U6$ .•IF NE USE BRANCH BELOW 

L.VBU2{R2).R0 .-OVERLAP? 
170$ ;IF LO YES 

(R2),R2 ;POINT TO NEXT LOCK BLOCK 
110$ ;IF NE THERE IS ONE 

;ASSUME SUCCESS ON READ VALIDATION 
*WI.WRV.<R3) ;IS THIS A WRITER? 
170$ ;IF EQ NO, SUCCESSFUL VALIDATION 

R5,R0 .-COPY POINTER TO SAVED LOCK BLOCK 

160$ ;IF NE ONE WAS IN FACT SAVED 

#IE.N0Dft377.(SP) .-SET FOR ALLOCATION FAILURE STATUS 



RI.-(SP) 

#L.LGTH.R1 

$ALOCB 

(SP)*.R1 

170$ 

aW.LKL(R3),(R0) 

R0.aW.LKL(R3) 

(RO)* 

R0,I.PRM+16(R1) 

R3.(R0) 

(R0) + 



:SAVE I/O PACKET ADDRESS 

.-PICK UP SIZE OF LOCK BLOCK 

.-ALLOCATE LOCK BLOCK 

; RESTORE I/O PACKET ADDRESS 

.-IF CS ALLOCATION FAILURE 

.-POINT NEW BLOCK TO SECOND ONE IN LIST 

.-POINT FIRST BLOCK IN LIST TO NEW ONE 

.-ADVANCE TO OWNER WORD 

:SAVE POINTER TO OWNER WORD 

:SET OWNER WORD 

; SET NO UNIOCK FLAG 

I.PRMv10(R1).(R0)* ;SET HluH PART OF VBN 

R4.(R0)* .-SET BLOCK COUNT 

I.PRM*12(R1).(R0) .-SET LOW PART OF VBN 

(SP)*,RO .-PICK UP ERROR STATUS 



ROUTINE TO CHECK FOR EXACT VBN AND BLOCK COUNT MATCH 
INPUTS: 

R1«I/0 PACKET ADDRESS 
R2sL0CK BLOCK ADDRESS 
R4=BVTE COUNT 



TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

1M075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 

TM075 



•••* f u *•** 



lOSUB MACRO Ml 108 U-DEC-77 20:02 PAGE 2-2/* 



1369 

1370 

1371 

1372 

1373 

137A 

1375 

1376 

1377 

1378 

1379 

1380 

1381 

1382 

1383 

1384 

1385 

1386 

1387 

1388 

1389 

1390 

1391 

1392 

1393 

1394 

1395 

1396 

1397 

1398 

1399 

UOO 

HOI 

1A02 

U03 

U04 

U05 

1A06 

U07 

1A08 001100 

U09 

U10 

U11 

U12 

U13 001100 

V.U 001102 

U15 

U16 

U17 

1418 

U19 

U20 

U21 

1422 

1423 

1424 

1425 



OUTPUTS: 

ALL REGISTERS PRESERVED. 
2=1 IF EXACT MATCH. 
Z=0 IT NO MATCH. 



180$: 



190$: 



CMP 

BNE 

CMPB 

BNE 

TST 

BEQ 

CMPB 

RETURN 

.ENDC 



L.VBU2(R2).I.PRM*12(R1) .-MATCH ON LOW ORDER? 
190$ ;IF NE NO 

L.VB1(R2).I.PRM+10(R1) .-MATCH ON HIGH ORDER? 



190$ 

R4 

190$ 

L.CNT(R2).R4 



.-IF NE NO 

;COUNT SPECIFIED? 

:IF EQ NO 

; MATCH ON COU^T? 



TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TH075 
TM075 
TM075 
TM075 
TM075 



**-$REL0C-REL0CATE USER VIRTUAL ADDRESS 

THIS ROUTINE IS CALLED TO TRANSFORM A 16 BIT USER VIRTUAL ADDRESS 
INTO A RELOCATION BIAS AND DISPLACEMENT IN BLOCK RELATIVE TO APR6. 

INPUTS: 

RO=USER VIRTUAL ADDRESS TO RELOCATE. 

OUTPUTS: 

R1=REL0CATI0N BIAS TO BE LOADED INTO PAR6. 
R2=DISPLACEMENT IN BLOCK PLUS 140000 (PAR6 BIAS). 



RO AND R3 ARE PRESERVED ACROSS CALL. 



$RELOC: 



.IF NDF M$$MGE 



010002 
005001 



MOV 
CLR 

.IFF 

MOV 
CLR 
ASL 
ROL 
ASL 
ROL 
ASL 
ROL 



R0,R2 
R1 



R0.R1 

R2 

R1 

R2 

R1 

R2 

R1 

R2 



;REF LABEL 



.-COPY PHYSICAL ADDRESS 
.-CLEAR RELOCATION BIAS 



COPY VIRTUAL ADDRESS 

ZERO APR NUMBER ACCUMULATOR 

COLLECT APR NUMBER 



*••* G 14 *•*• 



lOSUB MACRO MHOS U-OEC-77 20:02 



1A26 

1A27 

1A28 

1A29 

1A30 

1A31 

1A32 

1A33 

1A3A 

1A35 

1A36 

1A37 

1A38 001 10A 

1A39 

1AA0 

1AA1 

1AA2 

1AA3 

1AAA 

1AA5 

1AA6 

1AA7 

1AA8 

1AA9 

1A50 

1A51 

1A52 

1A53 

1A5A 

1A55 

1A56 

1A57 

1A58 

1A59 

1A60 

1A61 

1A62 

1A63 

1A6A 

1A65 

1A66 

1A67 

1A68 

1A69 

1A70 

1A71 

1A72 

1A73 

1A7A 

1A75 

1A76 

1A77 

1A78 

1A79 

1A80 

1A81 

U82 



PAGE 2-25 




ASL 


R2 


CLRB 


R1 


SWAB 


R1 


ROR 


R1 


sss 


UISAR0(R2).R1 


R0,R2 


BIC 


#1 77700. R2 


BIS 


#140000, R2 



CONVERT TO APR INDEX 

CLEAR EXTRANEOUS BITS 

COLLECT BLOCK NUMBER IN LOW BYTE 

CALCULATE RELOCATION BIAS 

COPY VIRTUAL ADDRESS 

CLEAR ALL BUT DISPLACEMENT IN BLOCK 

SET APR 6 BIAS 



.ENDC 



RETURN ; 

V 

•♦-$RELOM-RELOCATE AND MAP ADDRESS 

THIS ROUTINE IS CALLED TO TRANSFORM A 16 BIT USER VIRTUAL ADDRESS 
INTO A RELOCATION BIAS AND DISPLACEMENT IN BLOCK RELATIVE TO APR6 
AND LOAD THESE VALUES FOR ACCESS BY THE CALLER. 

INPUTS: 

RO=USER VIRTUAL ADDRESS TO REIOCATE. 

OUTPUTS: 

RO=DISPLACEMENT IN BLOCK. 

KISAR6 IS LOADED WITH THE RELOCATION BIAS. 

R3 IS PRESERVED ACROSS CALL. 






SRELOM: 



.IF DF MSSMGE 



:CALL 
MOV 
MOV 
RETURN 

.ENDC 



SRELOC 

R1,KISAR6 

R2.R0 



RELOCATE USER VIRTUAL ADDRESS 

SET KERNEL MAPPING REGISTER 

SET DISPLACEMENT IN BLOCK ADDRESS 



••-$RLCH-RELEASE CHANNEL 

THIS ROUTINE IS CALLED TO RELEASE A CHANNEL. THE CHANNEL STATUS IS SET TO 
IDLE AND AN ATTEMPT IS MADE TO DEQUEUE THE NEXT DRIVER WAITING TO USE THE 
CHANNEL. IF NO DRIVER IS WAITING, THEN A RETURN TO THE CALLER IS EXECUTED. 
ELSE THE DRIVER IS DEQUEUED. THE CHANNEL STATUS IS SET TO BUSY, THE DRIVER 
IS CALLED. AND THEN A RETURN TO THE CALLER IS EXECUTED. 



INPUTS: 



RSsADDRESS OF THE UNIT CONTROL BLOCK. 



*•*• H 1A **** 



lOSUB MACRO m 108 U-OEC-77 20:02 PAGE 2-26 



U83 
1A8A 
1A85 
H86 
H87 
1A88 
H89 
U90 
U91 
H92 
1A93 
1A9A 
1A95 
1A% 
1A97 
1A98 
1A99 
1500 
1501 
1502 
1503 
150A 
1505 
1506 
1507 
1508 
1509 
1510 
1511 
1512 
1513 
151A 
1515 
1516 
1517 
1518 
1519 
1520 
1521 
1522 
i523 
152A 
1525 
1526 
1527 
1528 
1529 
1530 
1531 
1532 
1533 
153A 
1535 
1536 
1537 
1538 
1539 



OUTPUTS: 



SRLCH: 



THE CHANNEL STATUS IS SET TO IDLE AND AN ATTEMPT IS MADE TO DEQUEUE 
THE NEXT DRIVER WAITING TO USE THE CHANNEL. 

RO. R1, AND R2 ARE PRESERVED ACROSS CALL. 

NOTE: RA IS DESTROYED BY THIS ROUTINE. 



.IF DF MSSIXD 

.ENABL LSB 

MOV U.SCB(R5).RA 

MOV S.CCB(RA).RA 

CLR A(RA) 

T$T (RA) 

BBQ 10$ 

MOV RO.-(SP) 

»V RI.-(SP) 

V R2.-(SP) 

MOV R5.-(SP) 



GET ADDRESS OF SCB 

GET ADDRESS OF CHANNEL CONTROL BLOCK 

SET CHANNEL IDLE 

ANY DRIVER IN WAIT QUEUE? 

IF EQ NO 

SAVE RO. R1. R2. AND R5 



.IF OF 


L$$DRVtM$$MGE 


MOV 


ICISAR5.-(SP) 


.IFTF 




MOV 

CALL 

ADD 


RA.RO 

$QRMVF 

#10,R1 


.IFT 




MOV 


(R1),KISAR5 


• IFTF 




MOV 
MOV 
CALL 
CALL 


-(RD.RA 
-(R1),R5 
20$ 
a-(R1) 


.IFT 




MOV 


(SP)».KISAR5 


.ENDC 




1 


(SP)*,R5 
(SP)*,R2 
<SP)*,R1 
(SP)t.RO 



;SAVE APR5 



SET ADDRESS OF WAIT QUEUE LISTHEAD 
REMOVE DRIVER FROM QUEUE 
POINT PAST SAVED R1 



;MAP THE DRIVER 



RETRIEVE ADDRESS OF SCB 
RETRIEVE ADDRESS OF UCB 
SET CHANNEL BUSY 
CALL DRIVER 



.•RESTORE APRS 



RESTORE R5. R2. R1 . AND RO 



*••• I 1A *••* 



lOSUB MACRO mi 08 1A-DEC-77 20:02 PAGE 2-27 



15A0 
15A1 
15A2 
15A3 
15AA 
15A5 
15A6 
15A7 
15A8 
15A9 
1550 
1551 
1552 
1553 
155A 
1555 
1556 
1557 
1558 
1559 
1560 
1561 
1562 
1563 
156A 
1565 
1566 
1567 
1568 
1569 
1570 
1571 
1572 
1573 
157A 
1575 
1576 
1577 
1578 
1579 
1580 
1581 
1582 
1583 
158A 
1585 
1586 
1587 
1588 
1589 
1590 
1591 
1592 
1593 
159A 
1595 
1596 



lOSt RETURN 



**-$RQCH-REQUESr CHANNEL 



THIS ROUTINE IS CALLED TO REQUEST EXCLUSIVE USE OF A CHANNEL. IF THE 
CHANNEL IS CURRENTLY BUSY, THEN THE CALLING DRIVER IS THREADED INTO THE 
CHANNEL WAIT QUEUE AND A RETURN TO THE CALLER OF THE DRIVER IS EXECUTED. 
ELSE THE CHANNEL STATUS IS SET TO BUSY AND A RETURN TO THE CALLING DRIVER 
IS EXECUTED. 



INPUTS: 



RA=ADDRESS OF STATUS CONTROL BLOCK. 
R5=ADDRESS OF UNIT CONTROL BLOCK. 
(SP}=RETURN ADDRESS OF CALLER. 
2(SP)=RETURN ADDRESS 0^ CALLER OF CALLER. 



OUTPUTS: 



IF THE CHANNEL IS IDLE. THEN IT IS SET BUSY AND A RETURN TO THE 
CALLER IS EXECUTED. ELSE THE CALLER IS THREADED INTO THE CHANNEL 
WAIT QUEUE AND A RETURN TO THE CALLER'S CALLER IS EXECUTED. 



SRQCH: 



awt 



MOV 


S.CCB(RA).RO 




GET ADDRESS OF CHANNEL CONTROL BLOCK 


TST 


A(RO) 




CHANNEL BUSY? 


UQ 


20$ 




IF EQ NO 


Nov 


RA.R1 




CALCULATE ADDRESS OF LAST WORD IN FORK BLOCK 


AM 


#S.FRIC»6.R1 






|ny 


RA.(R1} 




SAVE ADDRESS OF SCB 


IBy 


R5.-(R1) 




SAVE ADDRESS OF UCB 


MOV 


{SP)*.-(R1) 




SAVE DRIVER RETURN ADDRESS 


TST 


-(R1) 




POINT TO START OF BLOCK 


CALLR 


SQINSF 




INSERT BLOCK IN CHAM>KL WAIT QUEUE 


MOV 


RS.A(RO) 




SET CHANNEL BUSY 


CLR 


RO 




PICKUP VECTOR ADDRESS 


BIS8 


S.VCT(RA),RO 






ASL 


RO 




CALCULATE ACTUAL VECTOR ADDRESS 


ASL 


RO 






» 


S.CCB*2(RA). 


(RO) 


> : INSERT INTERRUPT ROUTINE ADDRESS 


S.CCBtA(RA). 


(RO) 


.■INSERT INTERRUPT PS WORD 


RETURN 








.DSABL 


ISB 







.ENDC 



*«-$SCDVT-SCAN DEVICE TABLES 

•♦-ISCDV1-SCAN DEVICE TABLES (ALTERNATE ENTRY) 



IHIS ROUTINE IS A CO-ROUTINE THAT IS CALLED TO SCAN THE DEVICE TABLES. FOR EAC 
UNIT CONTROL BLOCK THE CALLER IS RECALLED. 

INPUTS: 



*•*• J 14 •••• 



lOSUB MACRO W108 U-OEC-77 20:02 PAGE 2-28 



1597 

1598 

1599 

1600 

1601 

1602 

1603 

1604 

1605 

1606 

1607 

1608 

1609 

1610 

1611 

1612 

1613 

16U 

1615 

1616 

1617 

1618 

1619 

1620 

1621 

1622 

1623 

1624 

1625 

1626 

1627 

1628 

1629 

1630 

1631 

1632 

1633 

1634 

1635 

1636 

1637 

1638 

1639 

1640 

1641 

1642 

1643 

1644 

1645 

1646 

1647 

1648 

1649 

1650 

1651 

1652 

1653 



001106 
001112 
001114 
001116 
001120 
001124 
001132 
001134 
001140 
001144 
001146 
001150 
001152 
001154 
001160 
001162 
001164 
001166 
001170 
001172 
001176 
001200 
001202 
001204 
001206 
001210 



012703 
012604 
011303 
001433 
016305 
032765 
001370 
116346 
166316 
105216 
010346 
010546 
010446 
016504 
000241 

012604 
012605 
012603 
066305 
105316 
001362 
005726 
000743 
000261 
000114 



R3=L1ST POINTER (IF ENTRY AT $SCDV1) 



OUTPUTS: 



C^l IF NO MORE ENTRIES EXIST IN THE DEVICE TABLES. 
C=0 IF THE NEXT DEVICE TABLE ENTRY IS BEING RETURNED, 

R3=:ADDRESS OF THE DEVICE CONTROL BLOCK. 

R4=ADDRESS OF THE STATUS CONTROL BLOCK. 

R5=ADDRESS OF THE UNIT CONTROL BLOCK. 



OOOOOOG 



SSCDVT: 
SSCDVI : 
lOlt 



OOOOOOG 
OOOOOOG OOOOOOG 



000001G 
OOOOOOG 



OOOOOOG 



OOOOOOG 



20lt 



30t: 



«SDEVHD,R3 

(SP)*.R4 

(R3).R3 

30S 

D.UCB(R3).R5 

•OV.PSE.U.CWK 

10S 

D.UNIT*1(R3).- 

D.UNIT{R3).(S'» 

(SP) 

R3.-(SP) 

R5.-(SP) 

R4.-(SP) 

U.SCB(R5).R4 

8(SP)« 

(SP)».R4 

(SP)».R5 

(SP)».R3 

D.UCBL(R3).R5 

(SP) 

20S 

(SP)» 

10S 

(R4) 



.-GET ADDRESS OF FIRST DCB ADDRESS 

; REMOVE RETURN ADDRESS FROM STACK 

.GET ADDRESS OF NEXT DCB 

:IF EQ NO MORE 

.•POINT TO FIRST UCB 
R5) .-PSEUDO DEVICE? 

;IF NE YES 
(SP) .CALCULATE NUMBER OF UCB'S TO SCAN 

' * 

■SAVE DCB ADDRESS 

.SAVE UCB ADDRESS 

.SET RETURN ADDRESS 

;GET ADDRESS OF STATUS CONTROL BLOCK 

.■INDICATE ENTRY 

;CALL THE CALLER 

.■REMOVE RETURN ADDRESS 

.RESTORE UCB ADDRESS 

.-RESTORE DCB ADDRESS 

.■POINT TO NEXT UCB 

.■ANY MORE UCB'S TO SCAN? 

.■IF NE YES 

.■CLEAN STACK 

.GO AGAIN 

.■INDICATE NO ENTRY 

.•RETURN TO CALLER 



TM105 



••-»ASll«-ASSIGN UNIBUS MAPPING REGISTERS 

JMIS ROUTINE IS CALLED TO ASSIGN A CONTIGUOUS SET OF UMR'S. NOTE THAT 
FOR THE SAKE OF SPEED. THE LINK WORD OF EACH MAPPING ASSIG»i«NT BLOCK 
POINTS TO THE UMR ADDRESS (2N0) WORD OF THE BLOCK. NOT THE FIRST WORD. 
THE CURRENT STATE OF UMR ASSIGNMENT IS REPRESENTED BY A LINKED LIST OF 
MAPPING ASSIGNMENT BLOCKS. EACH BLOCK CONTAINING THE ADDRESS OF THE 
FIRST im ASSIGNED AND THE NUMBER OF UMR'S ASSIGNED TIMES 4. THE 
BLOCKS ARE LINKED IN THE ORDER OF INCREASING FIRST UMR ADDRESS. 

INPUTS: 

SO'POINTER TO A MAPPING REGISTEi^ ASSIGNMENT BLOCK. 
M.UMRN(RO)>NUMBER OF UMR'S REQUIRED * 4. 

OUTPUTS: 

ALL REGISTERS ARE PRESERVED. 



TM105 



TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 



•••• K U •••• 



lOSUB MACRO mi 08 U-OEC-77 20:02 PAGE 2-29 



165A 

165S 

1656 

1657 

1658 

1659 

1660 

1661 

1662 

1663 

1664 

1665 

1666 

1667 

1668 

1669 

1670 

1671 

1672 

1673 

167A 

1675 

1676 

1677 

1678 

1679 

1680 

1681 

1682 

1683 

1684 

1685 

1686 

1687 

1688 

1689 

1690 

1691 

1692 

1693 

1694 

1695 

1696 

1697 

1698 

1699 

1700 

1701 

1702 

1703 

1704 

1705 

1706 

1707 

1708 

1709 

1710 



20S: 



C=0 IF THE UHR'S WERE SUCCESSFULLY ASSIGNED. 

ALL FIELDS OF THE NAPPING REGISTER ASSIGNMENT BLOCK 

ARF IMTTIALIZED AND THE BLOCK IS LINKED INTO 

THE ASSIGNMENT LIST. 
C=1 IF THE IJMR'S COULD NOT BE ASSIGNED. 



,IF DF NSSEXT 



SASUMR::SAVNR 
TST 
NOV 

10$: NOV 



;SAVE R4 AND RS 
(RO)* -SKIP OVER LINK WORD (M.LNK) 

♦$UNRHD*2.R5 ;POINT TO UNR ASSIGNMENT LiSTHEAD ♦ 2 
R5,R4 .SAVE POINTER TO PREVIOUS 

30S :IF EQ ASSIGNNENT FAILURE 

(R5).(R0) .-POINT TO NEXT FREE UMR (M.LIMRA) (M.UMRA) 
M.UNRN-M.UMRA(R5).(R0) ; (N.UMRA) 
#UBMPR*<31.*4>.-(SP) .-PUSH POINTER PAST LAil JMR 
-(R5).R5 .-POINT TO NEXT ASSIGNMENT BLOCK (M.LNK) 
20S ;IF EQ THERE IS NONE 

(95). (SP) ;SET NEXT ALLOCATED UMR ADDRESS (M.UMRA) 
(RO).(SP) .-CALCULATE # OF FREE UMR'S • 4 (M.UMRA) 
(SP)».M.UMRN-M.UNRA(RO) .'ENOUGH UMR'S AVAILABLE? 



30$: 



10$ 

R0.-(R4) 

(R0>.R4 

R5.-2(R0) 

R4.R5 

#UBMPR!34.R5 

R5,R4 

R5 

R4 

R4 

R4 

R4 .FORM LOU SIXTEEN BITS OF ADDRESS 

R4.M.UMVL-2(R0) ;SET UP LOW 16 BITS OF ADDRESS 

R5.M.UMVH-2(R0) .SET BITS 4 I 5 

W .-PNT BACK TO LINK WORD PRESERVING CARRY 

RO 

: 



;IF LO NO 

.-LINK NEW BLOCK TO PREVIOUS (M.LNK) 
.-SAVE FIRST UMR ADDRESS (M.UMRA) 
.POINT NEW BLOCK '0 NEXT IN LIST (M.LNK) 
.-DUPLICATE FIRST UMR ADDRESS 
.-MASK OUT ALL BUT HI 2 BITS JN LOW BYTE 
.-CLEA9 OUT HIGH BYTE AND HIGH 2 BITS 
.-SHIFT HIGH 2 BITS TO BITS 4 ft 5 
.-CALCULATE HIGH BYTE OF LOW 16 BITS 
(LOSING BIT 200 FIRST) 



••-$DEUMR-OEASSIGN UNIBUS HAPPING REGISTERS 

THIS ROUTINE IS CALLED TO DEASSIGN A CONTIGUOUS BLOCK OF UMR'S. IF 
;hE NAMING ASSIGNMENT BLOCK IS NOT IN THE LIST. NO ACTION IS TAKEN. 
NOTE THAT FOR THE SAKE OF ASSIGNMENT SPEtD. THE LINK WORD POINTS TO 
THE UMR ADDRESS (2ND) WORD Of THE ASSIGNMENT BLOCK. 

INPUTS: 

R2»P0INTER TO ASSIGNMENT BLOCK. 
OUTPUTS: 

RO AND R1 ARE PRESERVED. 



TM095 

TM095 

TM095 

TN095 

TN095 

TN095 

TM095 

TM095 

TMC05 

TM095 

TM095 

TM095 

TN095 

TM095 

TM095 

TM095 

TM095 

TM095 

TN095 

TN095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

1M095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 

TM095 



*••* L U •••• 



lOSUB MACRO mi08 U-OEC-77 20:02 PAGE 2-50 



1711 

1712 

1713 

1714 

1715 

1716 

1717 

1718 

1719 

1720 

1721 

1722 

1725 

1724 

1725 

1726 

1727 

1728 

1729 

1750 

1751 

1752 

1755 

1754 

1755 

1756 

1757 

1758 

1759 

1740 

1741 

1742 

1745 

1744 

1745 

1746 

1747 

1748 

1749 

1750 

1751 

1752 

1755 

1754 

1755 

1756 

1757 

1758 

1759 

1760 

1761 

1762 

1763 

1764 

1765 

lf»1 



SDEUMR 


:TST 




k: 


10$: 


CMP 




g 




tn 


201- 


MOV 


50S: 


RETURN 



(R2)* .-SKIP OVER LINK fJRD (M.LNK) 

#$UMRH0*2.R5 .-POINT TO ASSIGNhcNT L'STHEAO ♦ 2 

-(R5).R2 ;IS IT THE NEXT ONE? (M.LNK) 

20$ ;IF EQ YES 

(R5).R5 ;ELSE POINT TO NEXT IN LIST (M.LNK) 

10$ ;IF NE THERE IS ONE 

50$ .-ELSE MAPPING ASSIGNMENT BLK NOT IN LIST 

-(R2).{R5) .-UNLINK TME BLOCK (M.LNKXM.LNK) 



*«-$SrMAP-SET UP UNIBUS MAPPING ADDRESS 

THIS ROUTINE IS CALLED BY UNIBUS NPR DEVICE DRIVERS TO SET UP THE 
UNIBUS MAPPING ADDRESS, FIRST ASSIGNING THE UMR'S. IF THE UMR'S 
CANNOT BE ALLOCATED. THE DRIVER'S MAPPING ASSIGNMENT BLOCK IS PLACED 
IN A yAIT QUEUE AND A RETURN TO THE DRIVER'S CALLER IS EXECUTED. THE 
ASSIGNMENT BLOCK WILL EVENTUALLY BE DEQUEUED WHEN THE UMR'S ARE 
AVAILABLE AND THE DRIVER WILL BE REMAPPED AND RETURNED TO WITH R1-R5 
PRESERVED AND THE NORMAL OUTPUTS OF THIS f JUTINE. THE DRIVER'S 
CONTEXT IS STORED IN THE ASSIGNMENT BLOCK AND FORK BLOCK WHILE IT IS 
BLOCKED AND IN THE WAIT QUEUE. ONCE A DRIVER'S NAPPING ASSIGNMENT 
BLOCK IS PLACED IN THE UMR WAIT QUEUE. IT IS NOT REMOVED FRO« THE 
QUEUE UNTIL THE UMR'S ARE SUCCESSFULLY ASSIGNED. THIS STRATEGY 
ASSURES THmT WAITING DRIVERS WILL BE SERVICED FIFO AND THAT DRIVER'S 
WITH LARGE REQUESTS FOR UMR'S WILL NOT WAIT INDEFINATELY. 



INPUTS: 



R4=ADDRESS OF DEVICE SCB. 
R5=ADDRESS OF DEVICE UCB. 
(SP)=RETURN TO DRIVER'S CALLER. 

OUTPUTS: 

UNIBUS MAP ADDRESSES ARE SET HP IN THE DEVICE UCB AND THE 
ACTUAL PHYSICAL ADDRESS IS MOVED TO THE SCB. 

NOTE: REGISTERS R1, R2, AND R5 ARE PRESERVED ACROSS CALL. 



$STMAP::MOV 
ADD 
MOV 
MOVB 
DEC 
MOV 
CLR 
ADD 
SUB 
BCC 
TST 
MOV 
CALL 
BCC 



10$: 



R4,R0 

#S.MPR*M.LGTH.RO 

U.BUF*2(R5).-(RO) 

U.BUF*1(R5).-(R0) 

RO ; 

U.CNT(R5).-(R0) ; 

-(RO) 

#4.{R0) 

«2D000.?(R0) 

10$ 

-(RO) 

-(RO).-(SP) 

$ASUMR 

20$ 



COPY SCB POINTER 

.-POINT PAST MAPPING ASSIGNMENT BLOCK 
;SAVE LOW 16 BITS ADDRESS (M.BFVL) 
.-SAVE HIGH 6 BITS OF ADDRESS (M.BFVH) 
POINT BACK TO NEXT WORD 
TEMORARILY STORE BYTE COUNT (M.UMVL) 
INITIALIZE UMR COUNT (M.UMRN) 
INCREASE COUNT FOR ONE UMR (M.MMRN) 
REDUCE BYTE COUNT BY 8K BYTES IM.UMVD 
IF CC MORE BYTES TO GO 
(M.UMRA) 

SAVE POSSIBLE WAIT QUEUE LINK (M.LNK) 
ATTEMPT TO ASSIGN REQUIRED UMR'S 
IF CC SUCCES.FUL. CHECK FOR UMR WAIT 



TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 



TM095 
TM095 
TM095 
TM09' 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
1M095 
TM095 
• *-1 



TM095 



•*-5 

TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
T«W95 
TM095 
TM095 



•••• H U •••• 



lOSUB MACRO Ml 108 U-DEC-77 20:02 PAGE 2-31 



1768 
1769 
1770 
1771 
1772 
1775 
177A 
1775 
1776 
1777 
1778 
1779 
1780 



1784 
1785 
1786 
1787 
1788 
1789 
1790 
1791 
1792 
1795 
179A 
1795 
1796 
1797 
1798 
1799 
1800 
1801 
1802 
1803 
180A 
1805 
1806 
1807 
1808 
1809 
1810 
1811 
1812 
1813 
18U 
1815 
1816 
1817 
1818 
1819 
1820 
1821 
1822 
1825 
1824 



20$: 



30f: 



TST 


(SP)* 


ADD 


/rS.FR»C+6.RA 


MOV 


R5,(R4) 


MOV 


(SP)+,-(RA) 


CALL 


SWTUMR 


MOV 


(R4)+.-(SP) 


MOV 


(R4)+.R5 


MOV 


(RA).KISAR5 


SUB 


#S.FRIC*10,R4 


BR 


SSTMAP 


MOV 


M.UMVL(RO).U.BUF 


MOVB 


M.UMVH(RO).U.Bl!F 


CLRB 


U.BUF*1(R5) 


CMP 


SUMRWT.RG 


BNE 


30$ 


MOV 


(SP),$UMRWT 


BNE 


30$ 


MOV 


#$UMRWT.SUMRyT>2 


TST 


(SP)* 



CLEAR STACK 

POINT INTO FORK BLOCK 

SAVE R5 IN FORK BLOCK (S.FRK*6) 

SAVE DRIVER'S RETURN ADDRESS (S.FRKtA) 

WAIT FOR CHANGE IN UMR ASSIGNMENT 

RESTORE DRIVER'S RETURN ADDR (S.FRK+4) 

RESTORE R5 (S.FRKt6) 

REMAP DRIVER (S.FRK*10) 

RESTORE R4 

TRV AGAIN 
t2(K5) .-STORE LOU WORD OF UMR VIRT ADDR 
(R5) ;STORE HIGH SIX BITS 
.CLEAR HIGH-ORDER BYTE 
;WAS THIS CALLER WAITING? 
:IF NE NO 

; DEQUEUE CURRENT CALLER'S BLOCK 
.•IF NE NOT END OF LIST 

.-UPDATE LAST IN LIST POINTER 
.-CLEAR STACK 



**-$DQUNR-DEQUEUE FROM UMR WAIT 

CONTROL IS TRANSFERRED HERE TO SEE IF A DRIVER IS WAITING FOR UMR 
ASSIGNMENT. FIRST THE CALLING DRIVER IS CALLED BACK AS A COROUTINE. 
WHEN THE CALLING DRIVER ISSUES A r<ETURN BACK TO THIS ROUTINE. A CHECK 
IS MADE TO SEE IF ANY DRIVERS ARE WAITING FOR UMR'S. IF SO THE WAIT- 
ING DRIVER'S CONTEXT IS RESTORED WITHOUT ACTUALLY DEQUEUEING THE 
MAPPING ASSIGNMENT BLOCK AND CONTROL IS PASSED BACK TO THE ORIGINAL 
UMR ASSIGNMENT ROUTINE. 

INPUTS: 

;SP)=RETURN ADDRESS TO DRIVER'S CALLER.. 

OUTPUTS: 

IF ANYONE IS WAITING THEI(< CONTEXT ?S RESTORED AND THE ALLOCA- 
TION ROUTINE IS CALLED BACK. 



SDQUMR: 



.ENABL 


LS8 


:CALL 


a(sp)t 


MOV 


$UMRWT.RO 


BEQ 


10$ 


TST 


(RO)* 


MOV 


{R0)*.R1 


MCV 


(R0)+.R2 


MOV 


(R0)».R3 


MOV 


(R0)*.R4 


JMP 


a(RO)* 



CALL THE CALLER AS COROUTINE 
ANYONE WAITING FOR UMR ASSIGNMENT? 
IF EQ HE HAS SINCE GONE AWAY 
POINT TO SAVED R1 
RESTORE SAVED REGISTERS 



JUMP BACK TO ALLOCATION ROUTINE 



•♦-$WTUMR-WAIT FOR CHANGE IN UMR STATE 

THIS ROUTINE STORES R1-RA AND THE RETURN PC IN THE MAPPING ASSIGNMENT 
AND QUEUES THE BLOCK IN THE UMR WAIT QUEUE FOR A SUBSEQUENT RECALL TO 



TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
(M095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
1M095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 



*••• N H **** 



lOSUB MACRO M1108 U-OEC-77 20:02 PAGE 2-32 



1825 
1826 
1827 
1828 
1829 
1830 
1831 
1832 
1833 
183A 
1835 
1836 
1837 
1838 
1839 
1840 
1M1 
1842 
1843 
1844 
1845 
1846 
1847 
1848 
1849 
1850 
1851 
1852 
1853 
1854 
1855 
1856 
1857 
1858 
1859 
1860 
1861 
1862 
1863 
1864 
1865 



THE CALLER WHEN THE STATE OF U«R ASSIGNMENT CHANGES. NOTE THAT IT IS 
POSSIBLE FOR THE MAPPING ASSIGWtENT BLOCK TO ALREADY BE IN THE WAIT 
QUEUE, BUT IF IT IS IT CAN ONLY BE AT THE HEAD OF THE QUEUE. 

INPUTS: 

RO-POINTER TO UMR ASSIGNMENT BLOCK 

OUi?'ITS: 

THE ASSIGNMENT BLOCK IS QUEUED IN THE UMR WAIT QUEUE. 
THE CALLER IS EVENTUALLY RETURNED TO AT SYSTEM STATE WITH R1-R4 
PRESERVED. 



SWTUMR: 



10S: 



;MOV 
CMP 
BEQ 
MOV 
MOV 
CLR 
MOV 
MOV 
MOV 
MOV 
RETURN 
.DSABL 

.ENDC 



(SP)*.12(R0) 

RO.SUMRWT 

10$ 

R0,aSUMRWTt2 

R0,SUMRWTf2 

(RO)* 

R1,(R0)* 

R2,{R0)» 

R3.(R0)* 

R4,(R0)* 

LSB 



STORE RETURN AODR TO ALLOCATE ROUTINE 

MAPPING ASSIGNMENT BLK ALREADY IN LIST? 

IF EQ YES 

LINK BLOCK TO LAST IN QUEUE 

UPDATE LAST IN LIST POINTER 

ZERO LINK WORD 

SAVE CALLER'S REGISTERS 



RETURN TO CALLER'S CALLER 



**-$ECCOR-COMMON ECC CORRECTION CODE FOR RP04/RK06. 

THIS ROUTINE APPLIES THE ECC CORRECTION ALGORITHM AND DETERMINES 
IF OFFSET RECOVERY IS REQUIRED (IF SUPPORTED). 



INPUTS: 



R1:cC0NTENTS OF ERROR REGISTER 
R2'=CSR ADDRESS 

RSsADDRESS OF FIRST ECC REGISTER 
RS-UCB ADDRESS 



OUTPUTS: 



R3«C0NTR0LLER INDEX 

C=0 IF OFFSET RECOVERY IS NOT REQUIRED 

R0=1S.SUC1377 

RlsBYTES ACTUALLY TRANSFERRED 

R2, R4, R5 ARE UNMODIFIED 

U.eUF AND U.BUFt? ARE UPDATED (VIA SRELOP) 

OR Cxi IF OFFSET RECOVERY IS REQUIRED 

R0»NUME2R OF GOOD BYTES TRANSFERED 
R1-R5 ARE UNMODIFIED 



TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
TM095 
1M095 
**-7 



**** B 15 **** 



**** B 15 **** 



lOSUB MACRO Ml 108 1A-0EC-77 20:02 PAGE 2-33 



1882 
1883 
188A 
1885 
1886 
1887 

1888 0C1212 

1889 001216 

1890 001220 

1891 001224 
1892 

1893 
189A 

1895 001226 

1896 001230 

1897 001232 

1898 001236 
1899 

1900 

1901 

190?. 001 2A0 

1903 001242 

1904 

1905 

1 906 

(907 001246 

1908 001252 

1909 

,910 

1911 

1912 

1913 

1914 

1915 

1916 

1917 001254 

1918 001256 

1919 001260 

1920 001262 

1921 001266 

1922 001270 

1923 001272 

1924 001274 

1925 001276 

1926 001300 
1927 

1928 
1929 
1930 
1931 

1932 001302 

1933 001304 

1934 001306 

1935 001310 

1936 001312 

1937 001314 

1938 001316 



FIRST CALCULATE THE BYTE OFFSET TO THE START OF BLOCK TRANSFERRED 



•IF DF S$$ECC 



016200 000002 

006300 

066500 OOOOOOG 

010046 



000261 

001446 

032701 000600 

001001 



005300 
042700 000777 



032701 010700 
001035 



SEC COR: 



:MOV 
ASL 
ADD 
MOV 



2(R2),R0 
RO 

U.CNT(R5).R0 
RO.-(SP) 



GET NEGATIVE NUMBER OF WORDS REMAINING 
CONVERT TO NEGATIVE BYTES REMAINING 
CALCULATE NUMBER OF BYTES TRANSFERED 
SAVE NUMBER OF BYTES TRANSFERRED 



.IF DF RSSJP0!RS$60F!RS$M0F 



10$: 



SEC 
BEQ 
BIT 
BNE 

.IFTF 

DEC 
BIC 

.IFT 

BIT 
BNE 

.ENDC 



40$ 

#600. R1 
10$ 



RO 
#777. RO 



#10700.R1 
40$ 



ASSUME OFFSET RECOVERY IS REQUIRED 
IF EQ NO BYTES TRANSFERED 
HEADER COMPARE OR CRC ERROR? 
IF NE YES 



; CALCULATE OFFSET TO SI ART OF BLOCK 
; CLEAR RESIDUE 



; PB010 
;**-1 



;ECC HARD ERROR? 
;IF NE YES 





SECOND CALCULATE BYTE OF 


012301 


MOV 


(R3)*,R1 


005301 


DEC 


R1 


010146 


MOV 


R1,-(SP) 


042701 177760 


BIC 


#*C<17>.R1 


040116 


BIC 


RI.(SP) 


000241 


CLC 




006016 


ROR 


(SP) 


006216 


ASR 


(SP) 


006216 


ASR 


(SP) 


061600 


ADD 


(SP),RO 




THIRD S'ilFT 


CORRECTION P 



011303 
005016 
005301 
002403 
006303 
006116 
000773 



20S: 



MOV 
CLR 
DEC 
BLT 
ASL 
ROL 
BR 



(R3).R3 

(SP) 

R1 

30$ 

R3 

(SP) 

20$ 



GET STARTING BIT NUMBER 

CONVERT TO RELATIVE BIT NUMBER 

SAVE STARTING RELATIVE BIT NUMBER 

ISOLATE SHIFT COUNT 

CLEAR SHIFT COUNT IN RELATIVE BIT ^^UMfc = 

CALCULATE OFFSET TO FIRST BYTE IN BLOC : 



CALCULATE OFFSET TP FIRST BYTE IN TRANS 



GET CORRECTION PATTERN WORD 

CLEAR SECOND WORD 

ANY MORE SHIFTS TO PERFORM? 

IF LT NO 

DOUBLE LEFT SHIFT 



•••• C 15 *♦•* 



♦*** C 15 »♦** 



lOSUB MACRO MHOS U-OEC-77 20:02 PAGE 2-3A 



1939 

19A0 

19A1 

19A2 

19A3 

19AA 001320 

19A5 

19A6 

19A7 

19A8 

19A9 

1950 001 32A 

1951 001326 

1952 001332 
1953 

195A 
1955 
1956 
1957 

1958 001336 

1959 001 3A2 

1960 001 3AA 

1961 001 3A6 

1962 001350 

1963 001 35A 
196A 

1965 
1966 
1967 
1968 

1969 001356 

1970 001362 

1971 001 36A 

1972 001370 

1973 001372 
lv7A 001 37A 
• '^75 001376 
'V76 OOUOO 
1977 

1978 
1979 
1980 
1981 
1982 
1983 
198A 
1985 
1986 
1987 
1988 
1989 
1990 
1991 
1992 
1993 
199A 
1995 



FOURTH APPLY FIRST CORRECTION 



30$: 



CALL 



50$ 



; APPLY ECC CORRECTION 



FIFTH APPLY SECOND CORRECTION 



012603 
062700 000002 



MOV (SP)*.R3 
ADD ir2.R0 
CALL 50$ 



.•RETRIEVE SECOND PATTERN WORD 

.•UPDATE COUNT 

.•APPLY ECC CORRECTION 



SIXTH FINISH OR CONTINUE PREVIOUS FUNCTION 



012700 OOOOOOC 

0002A1 

011601 

005226 

116A03 0000006 



A0$: 



MOV 

CLC 

MOV 

INC 

MOVB 

RETURN 



#IS.SUC8377,R0 

(SP).RI 
(SP) + 
S.CON(R4),R3 



ASSUME SUCCESSFUL TRANSFER 
OFFSET RECOVERY NOT REQUIRED 
RETRIEVE BYTES TRANSFERRED 
CLEAN STACK 
SET CONTROLLER INDEX 



ECC CORRECTION ROUTINE 



020065 OOOOOOG 
103006 

011146 
0A0311 
042603 
050^11 



50$: 



60$: 



CMP 

BHIS 

CALL 

MOV 

BIC 

BIC 

BIS 

RETURN 

.ENDC 



RO,U.CNT(RS) 

60$ 

$RELOP 

(R1),-(SP) 

R3.(R1) 

(SP)+,R3 

R3,(R1) 



BYTE OFFSET WITHIN RANGE? 
IF HIS NO 

RELOCATE PHYSICAL ADDRESS 
COPY CURRENT DATA WORD 
.NOT. PATTERN, AND. DATA WORD 
.NOT. DAT A WORD. AND. PAT TERN 
PATTERN. OR. DATA WORD 



*»-$RELOP-RELOCATE UNIBUS PHYSICAL ADDRESS 

^HIS ROUTINE RELOCATES A UNIBUS PHYSICAL ADDRESS TO A KISAR6 
JIAS AND DISPLACEMENT. 

INPUTS: 

RO=BYTE OFFSET FROM ADDRESS IN U.BUF+1 AND U.8UF+2 
; R5«UCB ADDRESS 
t U.BUF*1(R5)=HIGH ORDER BITS OF PHYSICAL ADDRESS 

; U.8UF+2(R5)=L0W ORDER BITS OF PHYSICAL ADDRESS 



OUTPUTS: 



**** D 15 **** 



lOSUB MACRO Ml 108 H-DEC-77 20:02 PAGE 2-35 



19% 
1997 
1998 
1999 
2000 
2001 
2002 
2005 
200A 
2005 
2006 
2007 
2008 
2009 
2010 
2011 
2012 
2013 
201A 
2015 
2016 
2017 
2018 
2019 
2020 
2021 
2022 
2023 
202A 
2025 
2026 
2027 
2028 
2029 
2030 
2031 
2032 
2033 
203A 
2035 
2036 
2037 
2038 
2039 
2040 
2041 
2042 
2043 
2044 
2045 
2046 
2047 
2048 
2049 
2050 
2051 
2052 



001402 



SRELOP: 



001402 016501 000002G 
001406 060001 



001410 



KISAR6=CAL .ULATED BIAS (MAPPED SYSTEM) 
R1=REAL AOi;RESS OR DISPLACEMENT 



.IF DF DSSIAGiSSSECC 



.IF DF M$SMGE 



U.8UF(R5),-(SP) .-RETRIEVE ORIGINAL MEMORY EXTENSION BITS 

; ISOLATE MEMORY EXTENSION BITS ; PB017 

;**-1 



.•RETRIEVE STARTING BUFFER ADDRESS 
.•CALCULATE ADDRESS OF V..''0 TO BE CORRECT 



MOV 


U.BUF(R5).-(SP 


BIC 


#*C<1400>.(SP) 


.IFTF 




MOV 


U.BUF+2(R5).R1 


ADD 


R0.R1 


.IFT 




ADCB 


KSP) 


SWAB 


R1 


BISB 


R1,(SP) 


ASL 


R1 


ROL 


(SP) 


ASL 


R1 


ROL 


(SP) 


MOV 


(SP) + ,»CISAR6 


CLRB 


R1 


SWAB 


R1 


ASR 


R1 


ASR 


R1 


BIS 


#140000, R1 


.ENDC 




RETURN 




.ENDC 




**-$CRPA$ - 


COMMON REGISTER 



PROPAGATE ADDRESS CARRY 
SWAP STARTING BUFFER ADDRESS 
MERGE 8 BITS OF UPPER ADDRESS BIAS 
COLLECT REMAINING TWO BITS 



SET BUFFER RELOCATION BIAS 
CLEAR LOW BYTE OF STARTING ADDRESS 
SWAP ADDRESS BACK 
SETUP APR6 ADDRESS 



THIS SUBROUTINE IS USED TO PASS THE CONTENTS OF THE DEVICE REGISTERS 
BACK TO THE DIAGNOSTIC TASK. ALL REGISTERS ARE PASSED IN THE ORDER 
IN WHICH THEY APPEAR ON THE UNIBUS. 

NOTE: THIS ROUTINE MAKES USE OF THE ERROR LOGGING ENTRIES S.ROFF AND 
S.RCNT IN THE SCB. THEREFORE ERROR LOGGING MUST BE ENABLED IN 
ORDER TO USE THIS ROUTINE. 



INPUTS: 



•••* c ^5 *t** 



lOSUB MACRO Ml 108 U-DEC-77 20:02 PAGE 2-36 



2053 
205A 
2055 
2056 
2057 
2058 
2059 
2060 
2061 
2062 
2063 
206A 
2065 
2066 
2067 
2068 
2069 
2070 
2071 
2072 
2073 
207A 
2075 
2076 
2077 
2078 
2079 
2080 
2081 
2082 
2083 
2084 
2085 
2086 
2087 
2088 
2089 
2090 
2091 
2092 
2093 
209A 
2095 
2096 
2097 
2098 
2099 
2100 
2101 
2102 
2103 
21 OA 
2105 
2106 
2107 
2108 
2109 



R1=I/0 PACKET ADDRESS 
R2=CSR ADDRESS 
RA=SCB ADDRESS 

OUTPUTS: 

R0.R2 ARE PRESERVED 



.IF DF 
$CRPAS::M0V 

.IF DF 

MOV 

.ENDC 



DSSIAG 
RO.-(SP) 



.-SAVE RO 



MSSMGE 

I.PRM*1A(R1>.KISAR6 ;SET RELOCATION BIAS 



GET REGISTER BUFFER ADDRESS 

PRESERVE INITIAL CSR ADDRESS 

GET OFFSET TO FIRST REGISTER 

ADD CSR ADDRESS 

GET NUMBER OF REGISTERS TO XFER 

TRANSFER A REGISTER 

DONE YET? 

IF NE NO 

RESTORE CSR ADDRESS 

RESTORE RO 



.ENDC 

**-$MUL-INTEGER MULTIPLY MAGNITUDE LUMBERS 
INPUTS: 



10$: 



MOV 


I,PRM+16(R1).R0 


MOV 


R2.-(SP) 


MOVB 


S.R0FF(R4).R2 


ADD 


(SP).R2 


MOVB 


S.RCNT(R«).R1 


MOV 


(R2)+,(R0)+ 


DEC 


R1 


BNE 


10$ 


MOV 


(SP)*.R2 


MOV 


(SP)*.RO 


RETURN 





R0=MULTIPLIER. 
R1=MULTIPLICAND. 



OUTPUTS: 



DOUBLE WORD RESULT IS RETURNED WITH THE 
HIGH PART IN RO AND THE LOW PART IN R1. 

REGISTERS R2, R3. RA, AND R5 ARE PRESERVED ACROSS CALL. 



001 A1 2 0100A6 

001 A1 A 0127A6 000021 

001 A20 005000 



$MUL:: 



.ENABL LSB 

MOV RO,-(SP) 

MOV #21, -(SP) 

CLR RO 



SAVE RO FOR ADDS 
SET REPEAT COUNT 
CLEAR HIGH PART 



•••* f 15 •*•« 



lOSUB MACRO Ml 108 U-DEC-77 20:02 



2110 00U22 


006000 


2111 00U2A 


006001 


2112 00U26 


103002 


2113 001A30 


066600 000002 


211A 001A3A 


005316 


2115 001A36 


003371 


2116 001 AAO 


000A15 


2117 




2118 




2119 




2120 




2121 




2122 




2123 




21 2A 




2125 




2126 




2127 




2128 




2129 




2130 




2131 




2132 




2133 001 AA2 


0127A6 000020 


21 3A 001 AA6 


0101A6 


2135 001A50 


005001 


2136 001A52 


006300 


2137 001 A5A 


006101 


2138 001 A56 


020116 


2139 001 A60 


103A02 


21 AO 001 A62 


161601 


21 A1 001 A6A 


005200 


21 A2 001 A66 


005366 000002 


21A3 001A72 


003367 


21 AA 001 A7A 


022626 


21 A5 001 A76 




21 A6 




21 A7 




21 A8 


000001 



PAGE 2- 


■37 






10$: 




ROR 


RO 






ROR 


R1 






BCC 


20$ 






ADD 


2(SP).R0 


20S: 




DEC 


(SP) 






BGT 


10$ 






BR 


50$ 



DOUBLE RIGHT SHIFT 

IF CC DO NOT ADD 

DECREMENT REPEAT COUNT 
IF GT MORE TO 60 
EXIT TO CALLER 



♦*-$DIV-INTEGER DIVIDE MAGNITUDE NUMBERS 

INPUTS: 

RO=DIVIDEND. 
R1=DIVIS0R. 

OUTPUTS: 

QUOTIENT IS RETURNED IN RO AND REMAINDER IN R1 . 

REGISTERS R2. R3. RA, AND R5 ARE PRESERVED ACROSS CALL. 



SET LOOP COUNT 

SAVE DIVISOR FOR SUBTRACTS 

CLEAR REMAINDER 

DOUBLE LEFT SHIFT 

SUBTRACT OUT DIVISOR? 
IF LO NO 

SUBTRACT OUT DIVISOR 
ADD IN LOW BIT 
DECREMENT REPEAT COUNT 
IF 6T MORE TO GO 
CLEAN STACK 



;**-1 



$DIV:: 


NOV 


#20.-(SP) 




MOV 


RI.-(SP) 




CLR 


R1 


30$: 


ASL 


RO 




ROL 


R1 




CMP 


RI.(SP) 




BLO 


A0$ 




SUB 


(SP),R1 




INC 


RO 


A0$: 


DEC 


2(SP) 




BGT 


30$ 


50$: 


CMP 
RETURN 


(SP)+,(SP)+ 




.DSABL 


LSB 



.END 



•t** G 15 **** 



lOSUB MACRO mi08 
SYMBOL TABLE 



U-OEC-77 20:02 PAGE 2-38 



AS.DEL= 
AS.EXT= 
AS.RED= 
AS.URT= 
A.AST 
A.BYT 
A.CBL 
A.DQSR 
A. IOC 
A.KSR5 
A.LGTH= 
A.MPCT 
A.NPR 
A.PCB 
A.PCBL 
A.PRl 
A.PRM 
A.STAT 
A.TCB 
A.TCBL 
CS$ORE= 
DV.PSE= 
OV.rTY= 
D.DSP = 
D.NAM = 
O.RS96= 
O.RS97= 
UCB = 
UCBL= 
UN1T= 
VCAN= 
CEF= 



D 
D 
D 
D 
FC 



FC.DIR= 

FC.FCO= 

FC.WAC= 

FE.CAL= 

FE.CEX= 

FE.ORV= 

FE.EXP= 

FE.EXT= 

FE.EXV= 

FE.LSI= 

FE.MUPs 

FE.MXT= 

FE.NLG= 

FE.PKT= 

FE.PLAr 

F.DREF 

F.DRNM 

F.FEXT 

F.FNUM 

F.FOWN 

F.FPRO 

F.FSEO 

F.FSQN 

F.FVBN 

F.HOLB 



000010 

OOOOOA 

000001 

000002 

000006 

OOOOOA 

000002 

177776 

000003 

17777A 

OOOOU 

000011 

000010 

000012 

000000 

000002 

000012 

000010 

OOOOOA 

000006 

OOOAOO 

****** Gx 

****** GX 

****** GX 

****** GX 

****** GX 

****** GX 

****** GX 

****** 

****** 

****** GX 

020000 

OAOOOO 

010000 

100000 

OOOOAO 

020000 

000010 

000200 

000001 

OOOOOA 

OOOAOO 

000002 

OAOOOO 

100000 

000100 

000020 

000036 

OOOOAO 

0OOOA2 

000002 

000010 

000012 

OOOOOA 

000007 

OOOOAA 

000016 



GX 
GX 



F.LBN 

F.LGTH 

F.LINK 

F.LKL 

F.NACS 

F.NLCK 

F.NUAC 

F.SCHA 

F.SIZE 

F.STAT 

F.UCHA 

H$$RTZ= 

H.CSP 

H.CUIC 

H.DSW 

H.DUIC 

H.EFLM 

H.EFSV 

H.FCS 

H.FORT 

H.FPSA 

H.FPVA 

H.GARD 

H.HDLN 

H.IPC 

H.IPS 

H.ISP 

H.LUN 

H.NLUN 

H.NML 

H.ODVA 

H.ODVL 

H.OVLY 

H.PFVA 

H.RCVA 

H.RRVA 

H.SPRl 

H.TKVA 

H.TXVL 

H.VEXT 

H.UND 

iE.Aan= 

IE.BLK= 

IE.DAA= 

IE.ONA= 

IO.ATT= 

IO.DET= 

lO.ULB- 

IS.SUC= 

LAST 

I.ATTL= 

I.EFN 

I.FCN 

I.IOSB 

I LGTH= 

I.LNK 

I.LN2 



000022 

000052 

000000 

000050 

000032 

000033 

00003A 

000015 

000026 

00003A 

00001 A 

00007A 

000000 

000010 

0000A6 

000012 

OOOOOA 

OOOOAO 

000050 

000052 

0000A2 

00003A 

000072 

000002 

000016 

OOOOU 

000020 

000076 

00007A 

000061 

000022 

00002A 

00005A 

000032 

000036 

000062 

000060 

000026 

000030 

000056 

OOOOAA 

****** 

****** 

****** 



000022 
OOOOAA 
000003 
000012 
OOOOU 
OOOOAA 
000000 
000006 



GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 



I.PRI 

I.PRM 

I.TCB 

I. UCB 

KSSCNT: 

K$$CSR= 

K$$IEN= 

ICSSLDC= 

K$$TPS= 

L.CNT 

L.L6TH 

L.LNK 

L.VB1 

L.WI1 

MPAR = 

MPCSR = 

M$$CRB= 

PIRQ = 

PRO = 

PR1 = 

PRA = 

PR5 = 

PR6 = 

PR7 = 

PS 

PS.APR= 

PS.CHK= 

PS.CKP= 

PS.CKR= 

PS.COM= 

PS.DEL= 

PS.CRV= 

PS.FXD= 

PS.LIO= 

PS.NSF= 

PS.OUT= 

PS.PER= 

PS.PIC= 

PS.SYS= 

P.BLKS 

P. BUSY 

P. IOC 

P.LNK 

P. MAIN 

P.NAM 

P. OWN 

P.PRI 

P.REL 

P.SIZE 

P.STAT 

P. SUB 

P.SWSZ 

P.TC8 

P. WAIT 

RSSFIIr 

RSIJPO= 

RS$JP1= 



000002 

00002A 

OOOOOA 

000010 

1775A6 

1775A6 

000115 

000001 

00007A 

000005 

000010 

000000 

OOOOOA 

000002 

172100 

1777A6 

0001 2A 

\77772 

000000 

OOOOAO 

000200 

0002A0 

000300 

0003A0 

^77776 

000007 

010000 

OAOOOO 

020000 

000200 

000010 

000020 

OOAOOO 

001000 

OOOAOO 

100000 

002000 

000100 

OOOOAO 

000016 

00002A 

000003 

000000 

000012 

OOOOOA 

000026 

000002 

OOOOU 

000016 

000030 

000010 

000022 

000026 

000020 

000001 

000000 

000001 



RS$JS1= 
R$$K11= 
R$»P11= 
RSSX11= 

R$$11M:= 

R$$11S= 

SUR - 

S$$ECC= 

S$$YSZ= 

S.CON = 

S.PICT = 

S.PRI = 

S.STBK= 

S.STS = 

TPS = 

TS.BLK= 

TS.CICP= 

TS.CKR= 

TS.EXE= 

TS.MSG= 

TS.NRP= 

TS.OUT= 

TS.RDN= 

TS.RUN= 

T$»A11= 

T$$C11= 

T$$J16= 

TSSKMG^ 

T$$M11= 

T.ACTL 

T.ASTL 

T.ATT 

T.CPCB 

T.DPRI 

T.EFLG 

T.IOC 

T.LBN 

T.LDV 

T.LNK 

T.MXSZ 

T.NAM 

T.OFF 

T.PCB 

T.PRI 

T.RCVL 

T.RRFL 

T.SRCT 

T.STAT 

T.ST2 

T.ST3 

T.TCBL 

T.UCB 

T2.AB0= 

T2.AST= 

T2.BFX= 

T2.CAF= 

T2.CHIC= 



000001 

000001 

000001 

000001 

000000 

000000 

1775/ J 

000000 

001000 

****** GX 

****** GX 

****** GX 

000012 

****** GX 

17756A 
170700 
000200 
000100 
100000 
020000 
010000 
OOOAOO 
OAOOOO 
OOAOOO 
000001 
000001 
000001 
000000 
000001 
000052 
000016 
00005A 
OOOOOA 
OOOOAO 
000022 
000003 
0000A1 
OOOOAA 
000000 
000050 
000006 
000060 
0000A6 
000002 
000012 
00006A 
000063 
000032 
00003A 
000036 
000030 
000026 
000100 
100000 
OOAOOO 
OOOAO'i 
02OOU0 



T2.CKD= 
T2.DST= 
T2.FXD= 
T2.HLT= 
T2.SPN= 
T2.STP= 
T2.TI0= 
T2.WFR= 
T3.ACP= 
T3.CAL= 
T3.CLI= 
T3.MCR= 
T3.NET= 
T3.NSD= 
T3.PM0= 
T3.PRV= 
T3.REM= 
T3.R0V= 
T3.RST= 
T3.SLV= 
UC.ATT= 



US.BSY= 

US.MNT= 

U.ATT = 

U.BUF = 

U.CNT = 

U.CTL = 

U.CW1 = 

U.CW2 = 

U.CW3 = 

U.RED = 

U.SCB = 

U.STS = 

U.UNIT= 

VC.BMW= 

VC.IFW= 

V$$CTR= 

V.FCB 

V.FFNU 

V.FIEX 

V.FMAX 

V.FPRO 

V.FRBK 

V.IBLB 

V.IBSZ 

V.IFWI 

V.LGTH 

V.LRUC 



SBCL 
SBLB 
SBSZ 

STAT 
TRCT 
V.VCHA 
V.VFSQ 
V.VOWN 



010000 

OAOOOO 

002000 

000200 

OOOOOA 

000020 

001000 

000001 

100000 

000100 

001000 

OOAOOO 

000020 

000200 

OAOOOO 

010000 

020000 

OOOOAO 

OOOAOO 

002000 

****** 

****** 

****** 

****** 

♦*»*(^* 

****** 

****** 

****** 

****** 

****** 

****** 

****** 

****** 

****** 

****** 

000002 

000001 

OOOAOO 

OOOOOA 

0000 A 5 

000023 

OOOOU 

00003A 

OOOOAO 

000010 

00001 1 

000002 

00OOA6 

0O0OA1 

000017 

000022 

000020 

OOOOAA 

000000 

tj0032 

000036 

000026 



GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 



•*«'» H 15 •*•• 



lOSUB MACRO M1108 
SYMBOL T/«LE 



U-OEC-77 20:02 PAGE 2-39 



V.VPRO 

V.UISZ 

W1.BPS= 

UI.DLKs 

W1.EXL= 

Wl.EXT= 

WI.LCK= 

W1.R0V= 

ui.«mv= 

W.BATT 
W.BFPD 

. ABS. 



000030 
000016 
100000 
010000 
OAOOOO 
002000 
OOAOOO 
OOOAOO 
001000 
000006 
OOOOK 



W.BHVR 


OOOOOA 


U.BLGH 


000020 


W.BLPD 


000016 


W.BLVR 


000002 


U.BNPD 


000015 


W.BOFF 


000012 


U.BPCB 


000000 


U.BSIZ 


000010 


W.CTL 


000000 


W.FCB 


000006 


W.LKL 


000010 



W.RTRV 


000012 


SDEVHD= 


****** GX 


SMPLNE 


001016RG 


W.VBN 


v;00002 


SDIV 


00U42RG 


SMPLUN 


OOIOOURG 


W.UISZ 


000003 


SDVMSG 


000070R6 


snuL 


00U12RG 


$AL0CB= 


♦»»«** 6X 


SECCOR 


001212RG 


$REL0C 


001100RG 


SBLKCX 


000A16RG 


SEXRQF= 


****** GX 


$RELOP 


00U02RG 


SBLKC 


000426RG 


SGTPKT 


0001 3ARG 


SSCDVT 


OC1106RG 


$BTMSt(= 


****** Gx 


SIOALT 


0005 URG 


SSCDVI 


001112RG 


SCEFI 


OOOOOARG 


SIOOON 


00051 6RG 


$SETF = 


****** GX 


SCEFN 


OOOOOORG 


SIOFIN 


000540RG 


$TKNPT= 


****** GX 


»C0MEF= 


****** GX 


SIOKIL 


000624RG 


$TKTCB= 


****** GX 


$DEPKT= 


****** GX 


SMPLND 


001036R6 







177776 000 
001500 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 6103 WORDS ( 2A PAGES) 
DYNAMIC MEMORY: 157AA WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:53 

CA1,20DIOSUB.SY0::A1,30:iOSUB/-SP=[1.1]EXEMC/ML,CA1,10]RSXMC,ri1.103IOSUB 
oM 



•••» I 15 ••♦• 




•**• J 15 *•*« 



LOWCR MACRO Ml 108 U-DEC-77 20:03 PAGE 2 



1 

2 

3 

I* 

5 

6 

7 

S 

9 
10 
11 
12 
13 
U 
15 
16 
17 
18 
19 
20 
21 
22 
23 
2A 
25 
26 
21 
28 
29 
30 
31 
32 
33 
34 
35 

36 000000 

37 000000 
38 

39 000000 

40 

41 

42 

43 

44 

45 

46 

47 

48 

49 

50 

51 

52 

53 

54 

55 

56 000000 

57 



.TITLE LOWCR 
•J DENT /08/ 



COPYRIGHT (C) 1974, 1978 

DIGITAL EQUIPMENT CORPORATION. MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE k^ITH THE TERMS OF SUCH LICENSE. 

VERSION 08 

D. N. CUTLER 11-AUG-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
T. J. MILLER 

MODIFIED BY: 

P. J. BEZEREDl 18-AUG-77 

PB031 — ADDITION OF SUPPORT FOR NEW CRASH DUMP 
MODULE. 

LOW CORE POINTERS. TRAP VECTORS. AND INTERRUPT VECTORS 

THIS FILE MUST BE FIRST IN THE TASK BUILDER COMMAND FILE SINCE 
IT OCCUPIES LOCATIONS STARTING AT REAL ZERO. 

MACRO LIBRARY CALLS 



.MCALL HWDDFS.PCBDFS 

HWDDFS 

PCBOFS ..SYSDEF 

.PSECT 



: DEFINE HARDWARE REGISTERS 
;DEFINE PCB OFFSETS AND SIZE 



LOCAL MACROS 

GENVT-GENERATE VECTOR ENTRY 

.MACRO GENVT ARC 



.IF DF 


EtSNSI 


.WORD 


SNS'ARG 


.IFF 




.WORD 


SNONSI 


.ENOC 




.WORD 


PR7! «<$»l-START>/4>fc1 7> 


.ENOM 





START: 



•••• K 15 •♦*• 



LOWCR MACRO HI 108 U-DEC-77 20:05 PAGE 2-1 



58 
59 
60 
61 
62 
63 
(A 000004 

65 000006 

66 000010 

67 000012 

68 OOOOU 

69 000016 

70 000020 

71 000022 

72 000024 

73 000026 

74 OOOO'/O 

75 000032 

76 000034 

77 000036 

78 000040 

79 000044 
80 

81 

82 

83 

84 

85 

86 

87 

88 

89 

90 

91 

92 

93 

94 

95 

96 

97 

98 

99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
114 



000100 



000004' 

OOOOOOG 

000340 

OOOOOOG 

000340 

OOOOOOG 

000340 

OOOOOOG 

000340 

OOOOOOG 

000340 

OOOOOOG 

000340 

OOOOOOG 

000340 

000167 OOOOOOG 

000046' 



sss- 



.REPT 

6ENVT 
.ENOR 



V$$CTR/4 
\«$$$-START>/<4*20» 



.=START»4 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 

J«P 

.WORD 

.BLKW 

.BLKW 

.BLKW 

.QLKW 

.BLKW 

.BLKB 



.DSW: 



STRP04 

PR7 

SILINS 

PR7 

STRACE 

PR7 

SIOTRP 

PR7 

SNONSl 

PR7 

SEMTRP 

PR7 

$TRTRP 

PR7 

SCRASH 

.♦2 



V$»CTR-60 



TRAPS TO 4 (ODD. STACK, NONEX MEM) 
ILLEGAL (RESERVED) INSTRUCTION TRAPS 
BREAr» POINT (TRACE) TRAPS 

NONSENSE INTERRUPT 

Em INSTRUCTION TRAPS 

TRAP INSTRUCTION TRAPS 

JUMP TO CRASH DUMP ROUTINE ; PB031 

ADDRESS OF DIRECTIVE STATUS .•••-1 

DIRECTIVE STATUS WORD 

FCS IMPURE AREA POINTER 

FORTRAN IMPURE AREA POINTER 

OVERLAY RUN TIME SYSTEM IMPURE AREA POINTER 

RESERVED FOR EXPANSION 



EXECUTIVE STACK AREA 



.BLKW 40. 



.•SYSTEM STACK FOR MAPPED AND REAL SYSTEMS. 



.IF DF DSSH11!MSSMGE!MtSNET 

.BLKW 20. ; 

.ENDC 

.IF DF I$$C11 

.BLKW 30. : 

.ENDC 



.IF DF PMLAS 
.BLKW P.LGTH/2 
.ENDC 



.•DEFINE EXThA STACK FOR PlAS SYSTEMS 



*••• L 15 **** 



LOWCR MACRO Ml 108 U-DEC-77 20:03 PAGE 2-2 

115 000520 SSTACK:: ;REr LABEL 

116 

117 000001 .END 



**t* M tS **** 



LOWCR MACRO Ml 108 
SYMBOL TABLE 



U-DEC-77 20:03 PAGE 2-3 



CtSORE= 


OOOAOO 


IC»»IEN= 


000115 


FE.CAL= 


OOOOAO 


KS$LDC= 


000001 


FE.CEX= 


020000 


<$STPS= 


000074 


FE.DRV= 


000010 


MPAR = 


172100 


FE.EXP= 


000200 


MPCSR = 


177746 


FE.EXT= 


000001 


MS$CRB= 


000124 


FE.EXV= 


00000/. 


PIRQ = 


177772 


FE.LSI= 


OOOAOO 


PRO = 


000000 


FE.MUP= 


000002 


PR1 = 


000040 


FE.MXT= 


040000 


PRA = 


000200 


FE.W.G= 


100000 


PR5 = 


000240 


FE.PKT= 


000100 


PR6 = 


000300 


FE.PLA= 


000020 


PR7 = 


000340 


H»»RT2= 


00007A 


PS 


177776 


K»CNT= 


1775A6 


P. ATT 


000034 


K$»CSR= 


177546 


P.BLKS 


000016 


. ABS. 


000040 


000 






000520 


001 




ERRORS 


DETECTED: 








P.BUSr 


00002^. 


P.HDR 


000014 


P. IOC 


000003 


P.LGTH= 


000032 


P.LNK 


000000 


P.MAIN 


000012 


P. NAM 


000004 


P. OWN 


000026 


P.PRl 


000002 


P. PRO 


000032 


P.REL 


000014 


P. SIZE 


000016 


P.STAT 


000030 


P. SUB 


000010 


P.SUSZ 


000022 


P.TCB 


000026 



P. WAIT 

R$$F11= 

RtSJPO: 

RSSJP1= 

RSSJS1= 

RSSKll- 

R$$P11= 

R$$X11= 

RSSIIN: 

R$$11S= 

START 

SWR = 

S$$ECC= 

S$$YSZ= 

TPS = 

T$$A11= 



000020 

000001 

000000 

000001 

000001 

000001 

000001 

000001 

000000 

000000 

OOOOOOR 

177570 

000000 

001000 

177564 

000001 



VIRTUAL MEMORY USED: 2398 WORDS ( 10 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:17 

C41.20:lOWCR.SY0:C41,3O:lOWCR/-SP=C1.1]EXEMC/ML.C41.10:RSXMC.C11.10]LOWCR 
6d|8 



T$$C11= 

T$$J16= 

TSSKMG^ 

TISMIIs 

V$$CTR= 

$CRASH= 

$EMTRP= 

$ILINS= 

$IOTRP= 

SNONSI= 

SSTACK 

$TRACE= 

$TP'"14= 

$TR ■,:.?= 

$S$ = 

.DSW 



000001 
000001 
000000 
000001 
000400 
****** GX 
****** GX 
****** GX 
****** GX 
****** GX 
000520RG 
****** GX 
****** GX 
****** GX 
000374R 
000044PG 



**** n 15 *•** 




*•*• B 16 **** 



*•** B 16 **** 



PANIC MACRO mi 08 U-DEC-77 20:0A PAGE 2 



1 
2 
3 
A 
5 

? 

8 

1? 

11 

1^ 
15 

16 

17 

18 

12 

21 



Is 



AC 

*] 

42 

44 
4» 

47 
41 



.TITLE PANIC 
.lOENT /05.03/ 



COPYRIGHT (C) 1974,1976,1977 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE JS FURNISHED UNDER A LICENSE FOR USE ONLY ON A 
SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE 
INCLUSION OF THE ABOVE COPYRIGHT NOflCE. THIS SOFTWARE. OR 
ANY OTHER COPIES THEREOF. MAY NOT BE PROVIDED OR OTHERWISE 
MADE AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH 
SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE 
TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN 
IN DEC. 

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF 
ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 

VERSION 05.02 

D. N. CUTLER A-AUG-73 

MODIFIED BY: 

J. M. GILBERT 22-APR-7A 

D. N. CUTLER 11-MAY-75 

DC062 — REFERENCE PROCESSOR STATUS WORD VIA MFPS/MTPS 
INSTRUCTIONS FOR THE LSI-11. 

K. E. KINNEAR 16-DEC-76 

KKOOi; — ADDITION OF SUPPORT FOR PROCESSORS 
WITH NO SWITCH REGISTERS. 

P. J. BCZEREDI 18-AUG-77 

PB031 -- ADDITION OF SUPPORT FOR NEW CRASH DUMP 
MODULE. 



PANIC DUMP ROUTINE 



.IF DF PSSNIC 



MACRO LIBRARY CALLS 



; PB031 
;**-1 



•••• C 16 *♦♦♦ 



**** C 16 ***♦ 



PANIC MACRO Ml 108 1A-DEC-77 20:04 PAGE 2-1 



.MCALL HUDDFS 
HWDDFS 



.'DEFINE HARDWARE REGISTERS 



LOCAL DATA 



.IF NDF C$$RSH 

SCRPBF : : .BLKW 18. 
SCRPST:: 

• ENDC 



.ENDC 



.-PANIC'S REGISTER BUFFER AND STACK 
;TOP OF PANIC'S TEMPORARY STACK 



PB031 
PB031 
PB031 
PB031 
PB031 
P8031 
PB031 
PB031 
:**-1 






98 
99 

100 

101 000000 

102 

103 

104 

105 

106 000000 000167 OOOOOOG 

107 

108 

109 

110 

111 

112 

113 

114 



••-SPANIC-PANIC DUMP 

THIS ROUTINE IS ENTERED WHEN THE SYSTEM CRASHES OR BY FORCING AN 
ENTRY VIA THE CONSOLE SWITCHES. ON ENTRY THE PROCESSOR STATUS AND 
REGISTERS ARE SAVED IN A TEMPORARY STORAGE AREA. PANIC THEN HALTS 
AWAITING A SET CF DUMP LIMITS TO BE ENTERED IN THE SWITCH REGISTER. 
THE FOLLOWING PROCEDURE IS USED TO OBTAIN A DUMP: 

1-WITH THE PROCESSOR HALTED ENTER THE LOW DUMP LIMIT IN THE 

SWITCH REGISTER. 
2-DEPRESS CONTINUE. THE PROCESSOR WILL AGAIN HALT. 
3HrfITH THE PROCESSOR HALTED ENTER THE HIGH DUMP LIMIT IN THE 

SWITCH REGISTER. 
4-DEPRESS CONTINUE. THE DUMP WILL BE OUTPUT ON THE DEVICE 

•PfSNIC 

THE FIRST LINE OF OUTPUT IS THE DUMP OF PS.RO.Rl .R2.R3.R4.R5. AND SP. 
SUCCEEDING LINES OF OUTPUT ARE THE ACTUAL DUMP. WHEN THE DUMP IS 
FINISHED, PANIC AGAIN HALTS AWAITING A NEW SET OF DUMP LIMITS TO 
BE INPUT. 



; PB031 



SPANK: 



.ENABL LSB 

.IF NDF PSSNIC 

JMP SBTSTP 
.IFF 
HALT 

.IF DF MSSMGE 



.•PANIC DUMP ROUTINE 

; RE-BOOT SYSTEM IF NO PANIC DUMP 
.-GET STARTING DUMP LIMIT 



; PB031 

;**-1 

Pfi031 
PB03I 
PB031 
PB031 
PB031 
PB031 
PB031 
;**-1 



**** D 16 **** 



PANIC MACRO M1108 U-DEC-77 20:0-!. PAGE 2-2 



wwww y IQ WVWT 



115 
116 
117 
118 
119 
120 
121 
122 
123 
12A 
125 
126 
127 
128 
129 
130 
131 
132 
133 
13A 
135 
136 
137 
138 
139 
UO 
U1 
U2 
U3 
UA 
1A5 
U6 

1A8 
1A9 
150 
151 
152 
153 
15A 
155 
156 
157 
158 
159 
160 
161 
162 
163 
16A 
165 
166 
167 
168 
169 
170 
171 



10$: 



MOV PS.SCRPBF 

.IFF 

MFPS SCRPBF 

.ENDC 



MTPS 

MOV 

MOV 

MOV 

MOV 

MOV 

MOV 

MOV 

MOV 

MOV 



#PR7 

R0,$CRPBF*2 

/«CRPBFtA,RO 

R1,(R0)+ 

R2.(R0)* 

R3,(R0)+ 

RA,(RO)* 

R5,{R0)+ 

SP.(RO) 

#$CRPST.SP 



.IFT 

MOV 

.IFF 

MOV 

.ENDC 



MOV 
BIC 
CALL 
BR 



a#O.Rl 



SWR.RI 



(SP)+,RO 

20i 
IDS 



:SAVE PS WORD 



;SAVE PS WORD 



LOCK OUT INTERRUPTS 
;;SAVE RRO 

;; POINT TO SAVE AREA 
SAWE REGISTER R1 TO SP 



SET NEW STACK POINTER 



.IF NDF 


SSSWRG 


MOV 


a*0.-(SP) 


.IFF 




MOV 


SWR.-(SP) ; 


.IFTF 




HALT 
MOV 
MOV 
CALL 


*$CRPBF.RO '; 

#$CRPBF+16,R1 

SPDMP 



; PB031 
;**-1 



; PB031 

;**-1 



; PB031 
; PB031 
;**-2 



; PB031 
;*-7 

; KK002 

.•♦♦-1 



GET ENDING DUMP LIMIT 
ALWAYS DUMP REGISTFRS FIRST 

DUMP REGISTERS 



;6ET LAST WORD ADDRESS 



;GET LAST WORD ADDRESS 



AND FIRST WORD ADDRESS 
MAKE SURE START IS EVEN 
DUMP MEMORY 
GO AGAIN 



; PB031 
; PB031 
;**-2 



; DUMP SELECTED BLOCK OF MEMORY 

SPDMP:: MOV #P$SNIC.R5 ;SET OUTPUT DEVICE CSR 



; PB031 



**** E 16 **** 



PANIC MACRO Ml 108 U-OEC-77 20:0A PAGE 2-3 



%WmW [ IQ VTWW 



172 
173 
17A 
175 
176 
177 
178 
179 
180 
181 
182 
183 
184 
185 
186 
187 
188 
189 
190 
191 
192 
193 
19A 
195 
196 
197 
198 
199 
200 
201 
202 
203 
20A 
205 
206 
207 
208 
209 
210 
211 
212 
213 

215 
216 
217 
218 
219 
220 
221 
222 
223 
22A 
225 
226 
227 
228 



20$: 
30$: 

A0$: 
50$: 



60$: 



70$: 



80$: 



90$: 



100$: 



110$: 



MOV 

CALL 

MOV 

MOV 

MOV 

MOV 

CMP 

BNE 

DEC 

B6T 

MOV 

CMP 

BLOS 

CMP 

BEQ 

MOV 

MOV 

MOV 

CALL 

MOV 

CALL 

CALL 

MOV 

TST 

CALL 

CALL 

MOV 

CALL 

CALL 

CALL 

MOV 

CMP 

BHI 

MOV 

MOV 

CALL 

MOV 

CALL 

MOV 

MOV 

CALL 

DEC 

BGT 

MOV 

MOV 

CALL 

SWAB 

CALL 

DEC 

BGT 

CALL 

CALL 

CMP 

BLOS 

TST 

CALL 

BR 



#U,R2 

$OUT 

RO,-(SP) 

RO.-(SP) 

R0.R2 

#8. .M 

(RO)+,a(SP) 

60S 

RA 

50$ 

R0,R2 

R0.R1 

A0$ 

R2,(SP) 

70$ 

(SP).R3 

a(SP).R0 

R2.(SP) 

$EDIT 

#'-,R2 

$01IT 

$our9 
(sp).h: 

-(R3) 
$EDIT 
$OUTB 
R0,R3 
SEDIT 
$CRLF 
$0UT 

R0.R1 

110$ 

RO.-(SP) 

(SP),RO 

WORD 

(SP),RO 

BYTE 

(SP)+.RO 

/rs.RA 

$OUTB 

RA 

80$ 

/r8.,RA 

(R0)*,R3 

120$ 

R3 

120$ 

RA 

90$ 

$CRLF 

$OUT 

R0.R1 

30$ 

(SP) + 

$OUT 

$OUT 



OUTPUT A FORM FEED ;**-1 

SAVE FOR RELATIVE ADDRESS 

SAVE START OF LINE ADDRESS 

SAVE CURRENT LINE 

COUNT FOR 1 LINE 

ARE WORDS EQUAL? 

IF NOT, PRINT LINE 

COUNT THROUGH LINE 

IF GT, NOT THROUGH YET 

UPDATE LINE STARTING ADDRESS 

AT END OF DUMP? 

IF NOT, CHECK NEXT LINE 

ANY LINES SUPPRESSED? 

NO, IF STARTING ADDRESS SAME 

EDIT OUT OLD STARTING ADDRESS 

GET MASTER WORD 

NOW HAVE NEW STARTING ADDRESS 

WORD EDIT 

SEPARATE ADDRESSES WITH MINUS 

OUTPUT MINUS 

AND NOW A BLANK 

NOW OUTPUT LAST SUPPRESSED WORD ADDP«='"S 

2 LESS THAN NEW START OF LINE 

OUTPUT LAST WORD OF IDENTICAL BLOCK 

ISSUE ANOTHER BLANK 

NOW GET REPEATED WORD 

OUTPUT REPEATED WORD 

ISSUE CARRIAGE RETURN/LINE FEED 

OUTPUT ANOTHER LINE FEED 

PUT START OF LINE IN RO 

AT END OF DUMP? 

IF HI, AT END 

GET BACK IN SYNC WITH NEXT ROUTINE 

RECAPTURE NEW START OF LINE 

EDIT WORDS 

RETRIEVE STARTING ADDRESS 

EDIT BYTES 

RETRIEVE STARTING ADDRESS 

SET LOOP COUNT 

OUTPUT A BLANK 

ANY MORE? 

IF GT YES 

SET REPEAT COUNT 

GET NEXT WORD 

OUTPUT LOW BYTE 

SWAP BYTES 

OUTPUT HIGH BYTE 

ANY MORE THIS LINE? 

IF GT YES 

OUTPUT A CR-LF 

OUTPUT ANOTHER LF 

END OF EDIT YET? 

IF NOT, GO AGAIN 

REMOVE START FOR RELATIVE ADDRESS 

OUTPUT 2 MORE LINE FEdDS 

AND DON'T RETURN HERE 



*•** F 16 **** 



PANIC MACRO M1108 U-DEC-77 20:0A PAGE 2-A 



229 
230 
231 
232 
233 
23A 
235 
236 
237 
238 
239 
2A0 
2A1 
2A2 
2A3 
24A 
2A5 
2A6 
2A7 
2A8 
2A9 
250 
251 
252 
253 
25A 
255 
256 
257 
258 
259 
260 
261 
262 
263 
26A 
265 
266 
267 
268 
269 
270 
271 
27Z 
273 

nt, 

275 
276 

ni 

278 
279 
280 
281 
282 
283 
28A 
285 



120$: 


CALL 


$OUTB 




CALL 


$OUTB 




BICB 


#200. R3 




CMP6 


R2.R3 




BLOS 


130$ 




BISB 


/rioo.R3 




MOVB 


#136.R2 


130$: 


CALL 


$OUT 




novB 


R3.R2 




INCB 


R3 




BMI 


$OUTB 




BR 


$OUT 




.DSABL 


LS8 


■ WORD 


EDIT 




WORD: 


nov 


R0,R3 




MOV 


#9..R4 




BR 


20$ 


10$: 


MOV 


(R0)t,R3 


20$: 


CALL 


$EDIT 




CALL 


$OUTB 




DEC 


RA 




B6T 


10$ 




BR 


$CRLF 


; BYTE 


EDIT 




BYTE: 


MOV 


R0,R3 




SUB 


A(SP).R3 




CALL 


$EDIT 




MOV 


#8..RA 


10$: 


MOV 


(R0)*.R3 




CALL 


EBYT 




CALL 


E8YT 

RA 

10$ 




.ENDC 






.IF DF 


C$$TTY!P$$NIC 



SUBROUTINE TO OUTPUT CR-LF 



$CRLF:: MOVB #15,R2 

CALL $OUT 

MOVB #12,R2 

BR $Ouf 



OUTPUT TWO BLANKS 

CLEAR PARITY BIT 

CONTROL CHARACTER? 

IF LOS NO 

CONVERT TO CHARACTER 

SET TO OUTPUT CARET 

OUTPUT BLANK OR CARET 

SET BYTE TO OUTPUT 

CHARACTER A RUBOUT? 

IF MI YES OUTPUT A BLANK 

OUTPUT CHARACTER 



EDIT LINE ADDRESS 
.SET LOOP COUNT 

GET NEXT WORD 
EDIT WORD 

OUTPUT ANOTHER BLANK 
ANY MORE THIS LINE? 
IF GT YES 



;COPY ADDRESS OF LINE 

.•CALCULATE BLOCK OFFSET 

;EDIT OFFSET FROM START OF BLOCK 

.-SET LOOP COUNT 

;GET NEXT WORD 

;EDIT HIGH BYTE 

;EDIT LOW BYTE 

.-ANY MORE THIS LINE? 

;IF GT YES 



; PB031 



OUTPUT CR 
OUTPUT A LF 



**•* 6 16 **** 



PANIC MACRO Ml 108 U-DEC-77 20:0A PAGE 2-5 



286 
287 
288 
289 
290 
291 
292 
293 
29A 
295 
296 
297 
298 
299 
300 
301 
302 
303 
30A 
305 
306 
307 
308 
309 
310 
311 
312 
313 
31A 
315 
316 
317 
318 
319 
320 
321 
322 
323 
32A 
325 
326 
327 
328 
329 
330 
331 
332 
333 
33A 
335 
336 
337 
338 
339 
3A0 
3A1 
3A2 



; SUBROUTINE TO 


EDIT ONE BYTE 




EBYT: 


CLR 


R2 


CLEAR CHARACTER ACCUMULATOR 




MOV 


#3.-(SP) 


SET CHARACTER COUNT 




BR 


EDT2 


COLLECT HIGH ORDER 2 BITS 


; SUBROUTINE TO 


EDIT ONE WORD 




SEDIT:: 


CLR 


R2 


CLEAR CHARACTER ACCUMULATOR 




MOV 


#6,-(SP) 


SET CHARACTER COUNT 




BR 


EDT3 


COLLECT HIGH ORDER BIT 


EDT1: 


CLR 


R2 


COLLECT NEXT 3 BITS 




ASL 


R3 






ROL 


R2 




EDT2: 


ASL 


R3 






ROL 


R2 




EDT3: 


ASL 


R3 






ROL 


R2 






ADD 


#'0.R2 


ADD DIGIT BIAS 




CALL 


SOUT 


OUTPUT CHARACTER 




DEC 


(SP) 


ANY MORE? 




B6T 


EDT1 


IF GT -ES 




TST 


(SP)* 


CLFAR STACK 


; OUTPUT SUBROUTINES 




$0UTB: : 


MOVB 
.ENDC 


#A0.R2 


SET TO OUTPUT BLANK 




• IF DF 


CSSRSH.'PSSNIC 




SOUT:: 


TSTB 


(R5) 


DEVICE READY? 




BPL 


SOUT 


IF PL NO 




MOVB 


R2,2(R5) 
#15. R2 


OUTPUT CHARACTER 




CMPB 


CARRIAGE RETURN? 




BN| 


20S 


IF NE NO 




nilip 


#1775U.R5 


OUTPUT DEVICE LINE PRINTER? 




NQ 


20S 


IF EQ YES 




CLR 


R2 


SET ZERO FILL CHARACTER 




nov 


#5.-(SP) 


SET FILL COUNT 


10tt 


CALL 


SOUT 


OUTPUT A FILL CHARACTER 




fil£ 


(SP) 


ANY MORE TO FILL? 




W 


10S 


IF GT YES 




TST 


(SP) + 


CLEAN STACK 


20St 


RETURN 







PB031 
PB031 
PB031 
PB031 
PB031 
PB031 



.ENDC 



**•* H 16 •••• 



PANIC MACRO M1108 U-DEC-77 20:04 PAGE 2-6 

3A3 000001 .END 



•*•* 1 16 *••« 



PW<1C MACRO M1108 U-DEC-77 20:0A PAGE ,?-7 
SYMBOL TABLE 



K$$TPS= 00007A 
MS$CRB= 0001 2A 
R$$F11= 000001 
RSS.IP0= 000000 
R$»JP1= 000001 
R$SJS1= 000001 



R$S»(11= 000001 
R$$P11= 000001 
R$»X11= 000001 
RSSIIMr 000000 
R$$11S= 000000 



C$SORE= OOOAOO 
H»$RTZ= 00007A 
K$KNT= 1775A6 
IC$$CSR= 1775A6 
IC$»IEN= 000115 
K»$LOC= 000001 

. ABS. 000000 000 
OOOOOA 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 1130 WORDS ( 5 PAGES) 
DYNAMIC MEMORY: 1574A WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:11 

CA1.2O]PANIC,SY0:CA1.3O3PANIC/-SP=C1J]EXEMC/ML.CA1,10]RSXMC,C11JO]PANIC 
:d ■ 



S$$ECC= 000000 
S$$YSZ= 001000 
T$JA11= 000001 
T$$C11= 000001 
T$$J16= 000001 



T$$KMG= 000000 
T$$M11= 000001 
V$$CTR= OOOAOO 
$8TSTP= *♦**♦♦ GX 
SPANIC OOOOOORG 



***• J 16 **** 




**** K 16 **** 



PARTY MACRO Ml 108 U-OEC-77 20:0A PAGE 2 



1 

4 
5 
6 

i 

11 

1 

1A 
15 
16 
17 



24 



.TITLE PARTY 
.IDENT /07/ 



COPYRIGHT (C) 1974, 1978 

DIGITAL EQUIPMENT CORPORATION. MAYNARD. MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 07 

0. N. CUTLER 14-FEB-74 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
T. J. MILLER 

MODIFIED BY: 

T. J. MILLER 21-SEP-77 

TM108 — WDIFY TO PROPERLY HANDLE MK11 ECC MEMORY FOR 
THE 11/70. 

MEMORY PARITY INTERRUPT HANDLING 

MACRO LIBRARY CALLS 



.IF DF PSSRTY 

.MCALL ABODFS.HUDDFS.PCBDFS.TCBDFS 

ABODFS .-DEFINE TASK ABORT CODES 

HWDDFS ; DEFINE HARDWARE REGISTERS 

PCBDFS .-DEFINE PARTITION CONTROL BLOCK OFFSETS 

TCBDFS ;DEFINE TASK CONTROL BLOCK OFFSETS 

LOCAL DATA 

EXEC PARITY ERROR MESSAGE 

EXMSG: .ASCI2 <15><12>/***EXEC PARITY ERROR ST0P**»/<15><12><12> ; 

INTERRUPT RECURSION LEVEL COUNTER 
PARLV: .WORD -1 ; 

PARITY CONTROL STATUS REGISTER ADDRESS TABLE 

*•** L 16 ••*• 



PARTY MACRO M1108 U-OEC-77 20:0A PAGE 2-1 



i$ 



61 

H 

63 



71 

74 
75 



.81 f W 1 

SPARTB:: 3 1 

ALKtl 16. 

.uZ.-^D SMPCSR 



DUMMY STORAGE FOR MEMORY ERROR REGISTER 
DUMMY CSR FOR NONEXISTANT REGISTERS 
MEMORY PARITY CSR TABLE 
POINT TO 11/70 CSR TABLE 



PDP-11/70 CACHE PARITY STATUS TABLE 



,IF DF P$$D70 



,IF DF ESSPER 



MSTAT: 
STAT: 



STAT: 



.BLKU 
.BLKW 
.BLKW 

.IFF 

.BLKW 

.ENDC 



FIRST TWO PARITY CSR'S 
MEMORY STATUS REGISTER 
LAST THREE PARITY CSR'S 



.-MEMORY STATUS REGISTER 



ERTRK: 



.BYTE 
.WORD 
.BYTE 
.WORD 
.WORD 



AA.120 



30.240 







ADDRESS/DATA GROUP 
TIME OF LAST ERROR 
ADDRESS/DATA GROUP 1 
TIME OF LAST ERROR 
END OF TABLE 



NEW CACHE PAF.ITY CSR CONTENTS 

$«PCTL::.BLKW 1 
.ENDC 



ill 



VECTOR OF CACHE CSR ADDRESSES 



SMPCSR::.BLKW 6 
.WORD 



PARITY VECTOR 



. = 1U 



.ASECT 

.WORD RARER 



;ALL SIX REGISTERS 

; TERMINATOR LINK FOR INITL AND SAVE 



ft*** H K **** 



B 1 ORGSS J 5 DRQIO E 10 CORAL M U lOSUB 



B 




DRGSS 


J 


5 


DRQIO 


E 


10 


CORAL 


M 




lOSUB 


C 




DRGSS 


K 


5 


DRQIO 


F 


10 




N 




I OSUB 


D 




DRGSS 


L 


5 




G 


10 


CRASH 


B 




I OSUB 


E 






M 


5 


DRRAS 


H 


10 


CP».SH 


C 




lOSUB 


F 




DRGTK 


N 


5 


DRRAS 


I 


10 


CR'-^H 


D 




lOSUB 


G 




DRGTK 


B 


6 


DRRAS 


J 


10 


CRASH 


E 




I OSUB 


H 




ORGTK 


C 


6 


DRRAS 


K 


10 


CRASH 


F 




I OSUB 


1 




DRGTK 


D 


6 


DRRAS 


L 


10 


CRASH 


G 




I OSUB 


J 






E 


6 




M 


10 


CRASH 


H 




I OSUB 


K 




DRGTK 


F 


6 


DRREG 


N 


10 


CRASH 


I 




I OSUB 


L 




ORGTP 


G 


6 


DRREG 


B 




CRASH 


J 






M 




DRGTP 


H 


6 


DRREG 


C 




CRASH 


K 




LOWCR 


N 






I 


6 


DRREG 


D 




CRASH 


L 


15 


LOWCR 


B 


2 


DKMAP 


J 


6 


DRREG 


E 




CRASH 


M 15 


LOyCR 


C 


2 


DRMAP 


K 


6 


DRREG 


r 






N 


15 


LOWCR 





2 


DRMAP 


L 


6 


DRREG 


G 




CVRTM 


B 


16 




E 


2 


DRMAP 


M 


6 


DRREG 


H 




CVRTM 


C 


16 


PANIC 


F 


2 


DRMAP 


N 


6 


DRREG 


I 




CVRTM 


D 


16 


PANIC 


G 


2 


DRMAP 


B 


7 


DRREG 


J 






E 


16 


PANIC 


H 


2 


DRMAP 


C 


7 


DRREG 


K 




ERROR 


F 


16 


PANIC 


1 




DRMAP 


D 


7 




L 




ERROR 


G 


16 


PANIC 


J 




DRMAP 


E 


7 


DRREQ 


M 




ERROR 


H 


16 


PANIC 


K 




DRMAP 


F 


7 


DRREQ 


N 




ERROR 


I 


16 


PANIC 


L 




DRMAP 


G 


7 


r>RREQ 


B 


12 


ERROR 


J 


16 


PANIC 


n 




DRMAP 


H 


7 




C 


12 


ERROR 


K 


16 




N 




DRMAP 


I 


7 


D))RES 


D 


12 


ERROR 


L 


16 


PARTY 


B 




DRMAP 


J 


7 


DRRES 


E 


12 


ERROR 


M 


16 


PARTY 


C 




DRMAP 


K 


7 


DRRKS 


F 


12 


ERROR 








D 




DRMAP 


L 


7 


ORRES 


G 


12 


ERROR 








E 






M 


7 


DRRES 


H 


12 










F 




DRMKT 


N 


7 


DRRES 


I 




lOSUB 








G 




DRMKT 


B 


8 




J 




lOSUB 








H 




DRMKT 


C 


8 


DRSED 


K 




lOSUB 








I 




DRMKT 


D 


8 


DRSED 


L 




lOSUB 








J 






E 


8 


DRSED 


M 




lOSUB 








K 




ORPUT 


F 


8 


DRSED 


N 




lOSUB 








L 




DRPUT 


G 


8 


DRSED 


B 




lOSUB 








K 




DRPUT 


H 


8 


DRSED 


C 




lOSUB 








N 




ORPUT 


I 


8 


DRSED 


D 




lOSUB 








B 




DRPUT 


J 


8 




E 




IOL>UB 








C 




DRPUT 


K 


8 


DRSST 


F 




lOSUB 















L 


8 


DRSST 


6 




lOSUB 








E 




DRQIO 


M 


8 


DRSST 


H 




lOSUB 








F 




DRQIO 


N 


8 


DRSST 


I 




lOSUB 








G 




DRQIO 


B 


9 




J 




lOSUB 








H 




DRQIO 


C 


9 


BFCTL 


K 




lOSUB 








I 




DRQIO 


D 


9 


BFCTt. 


L 




lOSUB 








J 




DRQIO 


E 


9 


BFCTL 


M 




lOSUB 








K 




DRQIO 


F 


9 


BFCTL 


N 




lOSUB 








L 




DRQIO 


G 


9 


BFCTL 


B 




lOSUB 








N 




DRQIO 


H 


9 


BFCTL 


C 




lOSUB 








N 




DRQIO 


I 


9 


BFCTL 


D 




lOSUB 








B 




DRQIO 


J 


9 


BFCTL 


E 




lOSUB 








C 




DRQIO 


K 


9 




F 




lOSUB 













DRQIO 


L 


9 


CORAL 


G 




lOSUB 








E 




DRQIO 


M 


9 


CORAL 


H 




OSUB 








F 




DRQIO 


N 


9 


CORAL 


I 




PSUB 








G 




DRQIO 


B 


10 


CORAL 


J 




loste 








H 




DRQIO 


C 


10 


CORAL 


K 




I05UB 








I 




DRQIO 


D 


10 


CORAL 


L 




I0SU6 









PUMI l<UCROM1108 U-i;EC-77 20:0A PAGE 2-2 



'15 

■^ 

118 
119 
1^0 
121 
1?2 
123 
12* 
125 
126 
.27 
128 
129 
130 
131 
132 
133 
134 
135 
136 
137 
138 
.39 
UO 
U1 
)U2 
U3 
U4 
U5 
146 

ue 

U9 
150 
151 
152 
153 
>M 
155 
156 
157 
158 
159 
160 
161 
162 
163 
164 
165 
166 
167 
168 
16'^ 
170 
171 



.WORD PR7 
.PSECT 



♦*-PARER-WEMGRY PARITY ERROR INTERRUPT 



THIS ROUTINE IS ENTERED AS JV RESULT OF A MEMORY PARITY ERROR INTERRUPT. IF 
THE ERROR OCCURED IN THE EXE.' JTIVE OR WHILE ON THE SYSTEM STACK. THEN A 
MESSAGE IS PRINTED ON THE CO' JflE TERMINAL AND THE SYSTEM IS HALTED. 
ELSE A SWITCH TO THE SYSTEM STACK IS EXECUTED AND THE TASK IN WHICH 
THE PARITY ERROR OCCURED IS LOCKED IN MEMORY. 



.ENABL LSB 

RECURS: JMP 60S 

?ARER: INC PARLV 

BNE RECURS 



,IF DF P»$D70 



MOV 
MOV 


RO.-(SP) 
R1,-(SP) 


.IF DF 


ESSPER 


MOV 
MOV 
MOV 
MOV 


«MPCSR,RO 
#MSTAT.R1 
a(R0)^.(R1)^ 
a{R0)*.{R1)> 


.IFF 




MOV 
MOV 


#$MPCSR*A.RO 
#STAT,rt1 


.IFTF 




MOV 
CMP 
BNE 
MOV 
MOV 

Hi 


#-1.(R1) 

(R0)*.#MPCSR-2 

2% 

a-(R0;,(R1) 

(R1),a(R0)« 

#50000. (R1)» 

3$ 


.IFT 




MOV 


a(R0)».(R1)* 


.IFTF 




MOV 


#3,8-2(R0) 


.IFT 





;;JUMP TO HALT PROCESSOR 
;; INTERRUPT RECURSION? 
;;IF NE YES 



;;;SAVE RC 
;;;SAVE R1 



POINT TO PARITY CSR TABLE 
POINT TO PARITY CSR SAVE AREA 
SAVE LOW ADDRESS REGISTER 
SAVE Hir,4 ADDRESS REGISTER 



.•POINT INTO PARITY CSR TA8LC 
.-POINf TO STATUS WORD SAVE AREA 



.•ASSUME MEM PARITY ON NONCACHE MACHINE 

: RUNNING ON CACHE MACHINE? 

;IF NE NO 

;SAVE MEMO:iY ERROR REGISTER 

; CLEAR MEMORY REGISTER AND ADDRFSS REGS 

.•DOUBLE ERROR? 

;IF NE NO 



.SAVE MEMORY CONTROL REGISTER 



.•TURN CACHE TRAPS OFF 



*••• B 1 **** 



BABTv MAfAn Mima ix..ncr.77 3n-hL Pkct 9«1 



NOV {SP)*.R1 
MOV (SP)*.RO 

.IFTF 



.IF DF MSSMGE 



•IT 
BNE 

.IFF 

CMP 

i 

.ENDC 



*CMODE,?{SP) 
4S 



(SP).SEXSIZ 
3S 

SSTKDP 
4S 



PARTY MACRO Ml 108 U-DEC-77 20:0A PAGE 2-3 

172 MOV a(R0)+.<R1)t 

173 MOV a(RO)*.(Rl)* 
17A 

175 .ENDC 

176 

178 2St 

179 

180 

181 

182 

183 

184 

185 

186 

187 

188 

189 

190 

191 

192 

193 

194 

195 

196 

197 

198 

199 .IFT 

200 

201 Sll TST STAT 

202 MLI 20$ 

203 MV RO,-(Sp: 

204 MV R1. -vSP) 

205 Nov *ERTRK,R1 

206 CALL US 
20r MOV (SP)*.R1 

208 my (SP)«,R0 

ly. »i m m 

214 

215 .IFTF 

216 

217 

218 

219 

220 

221 

222 

221 

22t, 

227 
228 



at 



DIRSVt 



.•SAVE MAINTENANCE REGISTER 
.•SAVE CACHE HIT REGISTER 



;; .-RESTORE R1 
;;;RE STORE RO 



;;;PREV10US MODE USER? 
;;;1F NE YES 



;PARITY ERROR PC IN EXEC? 
;IF LO YES 

;PARITY ERROR ( . SYSTEM STACK? 
;IF LE YES 



FATAL MEMORY ERROR? 
IF LE YES 
SAVE REGISTERS 

POINT TO ERROR TRACKING TABLE 
EXECUTE CACHE ALGORITHM 
RESTORE REGISTERS 

RETURN FROI^ TRAP 



J ;; FATAL M.-MORY PARITY ERROR 



;;;SAVE REGISTERS AND SET PRIORITY 



LOG PARITY ERROR IN TASK 

THE FORMAT OF THE EMB FOR CACHE PARITY IS AS FOLLOWS. 



WD. 00 - LINK WORD 
WO. 01 - SIZr=57.»2 



wd! 03 



PROIESSOR TYPE / ENTRY CODE=002 
MINI ^E / SECOND 



••*• C 1 **** 



DADTv Kuron Ml inn u~nrr-77 70-OA pagi^ ?-4 



PARTY MACRO MIIOB U-DEC-77 20:0A PAG«^ 2-A 



229 
230 
231 
232 
233 
23A 
235 
236 
237 
238 
239 
2A0 
2A1 
2A2 
2A3 
24A 
2A5 
2A6 
2U7 
248 
2A9 
250 
251 
252 
253 
25A 
255 
256 
257 
258 
259 
260 
261 
262 
263 
26A 
265 
266 
267 
268 
269 
270 
271 
272 
271 
27k 
275 
276 
277 
276 
2^9 
2B0 
281 
282 
283 
284 
283 



SS: 



6S: 



71: 



WD. OA - DAY / HOUR 

WD. 05 - YEAR / MONTH 

WD. 06 - ERROR SEQUENCE NUMBER 

WD. 07 - TRAP PC 

WD. 08 - TRAP PS 

WD. 09 - FIRST WORD OF TASK NAME 

WD. 10 - SECOND WORD OF TASK NAME 

WD. 11 - FIRST WORD OF PARTITION NAME 

WD. 12 - SECOND WORD OF PARTITION NAME 

WD. 13 - PARTITION BASE ADDRESS 

WD. 1A - PARTITION SIZE 

WO. 15 - WD. 30 - MEMORY PARITY CSR'S 

WD. 31 - WD. 36 - CACHE PARITY CSR'S 



.IF DF ESSPER 

MOV #37.*2.R1 .-SET SIZE OF EMB TO ALLOCATE 

MOV #2*<1*256.>.-(SP) .-PUSH PARITY ERROR CODE AND TYPE=11/A5 

CALL SALEMB .-ALLOCATE EMS 

BCS 8$ ;IF CS ALLOCATION FAILURE 



.IF OF P$fD70 



CMP 

BNE 

INCB 

CMP 

BEQ 

INCB 

.IFTF 

MOV 
CMP 
MOV 
MOV 
KOV 
MOV 
MOV 
MOV 
MOV 
MOV 
MOV 
MOV 
MOV 
MOV 
CMP 
BLO 

.JFT 

rsr 

MOV 
CMP 



SMPCSR*6,*MPCSR ;IS THE PROCESSOR A CACt-c PROCESSOR? 

5S ;IF NE NO 

5(R1) .-ADVANCE PROCES^Oa NUMBcR 

IMPCSR*2.#MPCSR-A ;IS IT AN 11/70? 

5S .-IF EQ YES 

5(R1) .-ADVANCE PROCESSOR NUMBER 



aSHEADR,R2 

(R2)*.(R2)» 

(R2)+,(R0)* 

(R2)t.(R0)» 

ITKTCB,R2 

T.NAM(R2).(R0>t 

T.NAM^2(R2),(R0) 

T.PCB(R2).R2 

P.I<AM<R2).(R0)» 

P.NAM«2(.12),(R0) 

P.REI 'R2),(R0)» 

P.SI2t(R2),(RO)* 

*$PARTBt2.R2 

a(R2)^,(R0)t 

R2,#$PARTB»2»<16 

6t 



(R2) + 

(R2)»,(R0)» 

R2,/I'MSTAT*U 



.-PICK UP SAVED STACK POINTER 

.-SKIP OVER SAVED RA AND R5 

.-STORE TRAP PC 

.-STORE TRAP PS 

.-PICK UP CURRENT TASK TCB ADDRESS 

.-STORE TASK NAME 

.-PICK UP TASK PCB ADDRESS 
.-STORE PARTITION NAME 
♦ ; 

.-STORE PARTITION BASE ADDRESS 
:STORE PARTITION SIZE 
;POINT TO MEMORY PARITY CSR TABLE 
; STORE MEMORY PARITY CSR CONTENTS 
.»2> ;DONE YET? 
.-IF LO NO 



POINT TO CACHE PARITY CSR'S 
STORE SAVED CACHE CSR CONTENTS 
DONE YET? 



•••ft y •••• 



iiAbTv itkran Miina l/..ncr-77 7(\-(\L PARF >•% 



PARTY JWCRO M1108 U-DEC-77 20:0A PAGE 2-5 



286 
287 
288 
289 
290 
291 
292 
293 
294 
295 
296 
297 
298 
299 
300 
301 
302 
303 
304 
305 
306 
307 
308 
309 
310 
311 
312 
313 
3U 
315 
316 
317 
318 
319 
320 
321 
322 
523 
324 
325 
326 
327 
328 
329 
330 
331 
332 
333 
334 
335 
336 
337 
338 
339 
340 
54' 
542 



8S: 



BLO 


7$ 


;IF LG NO 


.ENDC 






CALL 


SQEMB 


; QUEUE ERROR MESSAGE BLOCK 
:REF LABEL 


.ENDC 






.IFT 






MOV 
TST 
BGT 
BEQ 


#ERTRK.R1 
STAT 
14$ 
11$ 


."C'N ERROR TRACKING TABLE 
;WAd LY A CACHE ERROR? 
;IF 61 



.IFTK 



; CLEAR ALL PARITY REGISTERS AND REENA 

; 



CALL SCLPAR 



;RESET 



«« PARITY ERRORS 
\RITY CSR'S 



FREEZE CURRENT TASK IN MEMORY AND THf I i ;T TASK 



MOV $TKTC8,R1 ;GET TCB , jRESS OF CURRENT TASK 

BIS /l'T2.FXD,T.ST2(R1) ;FIX TA; ; IN MEMORY 

BIC *T3.REM.T.ST3{R1) .-CLEAR REMOVE ON EXIT BIT 



,IF DF D$$SHF 



MOV 
BIT 
BEQ 
BIS 

.ENDC 



T.PCB(R1),R0 ;CiET ADDRESS OF TASK PCS 
#PS.SYS,P.STAT(RO) .'SYSTEM CONTROLLED PARTITION? 
11$ ;IF EQ NO 

#PS.NSF.P.STAT(RO) .-FREEZE PAi^TIilON FOR SHUFFLLF^ 



.- TM108 
.-••-4 



11$: MOV ffS.PRTY.RO .-SET HEASON FOR ABORT 
CALL $ABTSK ; ABORT TASK 



.IFT 

BR 16$ 



I 



; POP-n/70 CACHE TRAP 

■ 

12$: MOV $TTNS-4,-(R1) .-i.-SAVE TIME OF LAST ERROR 



•••* E 1 •••* 



PARTY MACRO M1108 U-DEC-T? 20:04 PAGF 2-6 



PARTY MACRO Ml 108 U-DEC-77 20:0A PAGE 2-6 



343 
34A 
345 
346 
347 
348 
349 
350 
351 
352 
353 
354 
355 
356 
357 
358 
359 
360 
361 
362 
363 
364 
365 
366 
367 
368 
369 
370 
371 
372 
373 
374 
375 
376 
377 
378 
379 
380 
381 
382 
383 
384 
385 



13$: 


TST 


(RD* 


14$: 


novB 


(RI)t.RO 




BEQ 


16$ 




BITS 


(P1)*.STAT 




BEQ 


13$ 




CMP 


(Rl)+.$TTNS-4 




8NF 


^Zh 




BIS 


RO,$MPCTL 




BR 


1«f 


16i: 


MOV 


?JiPCTL.a$MP(;SR*6 



POINT TO NEXT GROUP 

GET CACHE DISABLE BITS 

IF EQ END OF TABLE 

ERROR IN THIS GROUP? 

IF EQ NO 

OCCUR IN SAME MINUTE? 

IF NE NO 

DISABLE THAT PART OF CACHE 
,|R0CESS NEXT GROUP 
RELOAD 11/70 PARTIY CSR 



.ENDC 



AT THIS POINT EVERYTHING HAS BEEN CLEANED UP AND THE USER MAY 
INSERT CODE SPECIFIC TO HIS APPLICATION. 

*************** 

INSERT CODE HERE-ALL REGISTERS ARE AVAILABLE 

*************** 

EXIT SYSTEM 



DEC PARLV 
RETURN 



;RESET RECURSION LEVcL 
.-EXIT FROM TRAP 



PARITY ERROR OCCURED WHILE IN EXEC CODE. THIS IS A FArAL SITUATION 
AND THE SYSTEM IS SHUT DOWN. THE USER MAY !NSERT CODE SPECIFIC 
TO HIS APPLICATION AT THIS POINT. 



20$: 



;;;REF LABEL 



30$: 
A0$: 



50$: 
60$: 



INSERT CODE 


*** 
HERE-ALL REGISTERS HAVE NOT BEEN SAVED 






MOV 


f60^,8«4 


;;PLUG NONEX MEMORY VECTOR 


MCV 


PO.-(SP) 


;;SAVE RO 


MOV 


#EXMSG.RO 


;;GET ADDRESS OF PARITY SfOP MESSAGE 


MOVB 


(R0)*.TPS*2 


; .-OUTPUT NEXT BYTE 


BEQ 


50$ 


:;IF EQ DONE 


: TSTB 


TPS 


;; OUTPUT DONE? 


BPL 


^0$ 


.•;IF PL NT 


BR 


30$ 


::G0 AGAIN 


MOV 


(SP)».RO 


;; RESTORE RO 


HALT 




;;HALT S -"1 


BR 


60$ 


;;IF CONTli^. ^ALT AGAIN 


.DSABL 


LSB 





•♦-$CLPAR-CLCAR PARITY REGISTERS 

THIS ROUTINE CLEARS OUT ALL PARITY ERRORS IN THE MEMORY PARITY ERROR 



TM108 
TMigi 
TMlOi 
TM108 



••*• f 1 **•« 



PARTY MACRO Ml 108 U-DtC-77 20:0* PAGE 2-7 



PARTY NACROmi08 U-DEC -77 20:04 PAGE 2-7 



REGISTERS AND ENABLES PARITY ERROR NOTIFICATION. 
INPUTS: 

NONE. 
OUTPUTS: 

NONE. 

NOTE: IF THE SYMBOL MSSKII IS DEFINED (11/70 TYPE ECC MEMORY). 
THIS ROUTINE WILL NOT PROPERLY HANDLE UNIBUS ECC MEMORY 
(SUCH AS MF11S-K) SINCr THE ROUTINE ASSUMES THAT ANY 
; OTHER MEMORY ON THE SYSTEM MUST BE PARITY MEMORY AND 

; THAT AN ATTEMPf TO SET THE SINGLE-BIT ECC ERROR BIT ON 

SUCH A MEMORY WILL FAIL. THIS ASSUMPTION IS USED TO 
DISTINGUISH MK11 ECC MEMORY FROM PARITY MEMORY. 



SCLPAR. 
101: 



:MOV 



»$PM(JB*d.M 



.•POINT TO PARITY CSR VECTOR 
:REF LABEL 



.IF DF M$$K11 



20S: 



30S: 



Tsr 

BPL 
MOV 
BIT 
BEQ 
MOV 
B'r 

.ENDC 



MOV 

CMP 

BLO 

RETURN 

.ENDC 



(RO) 

20S 

#21,8(R1)* 

#20.a-(R1) 

20S 

#100000. 8(R0)^ 

30S 

#1,a(R0)« 



EVEN WORD CSR PRESENT? 

IF PL NO 

SET ENABLE 

SINGLE-BIT 

IF EQ NO 

SET ENABLE BIT AND 



AND SINGLE-BIT ECC ERROR 
ECC ERROR BIT SET (MKlD? 



CLEAR ERROR BIT IN 



CLR REST IN 
SECOND WORD 



1ST WORD 



ENABLE PARITY ERROR NOTIFICATION 



#1.a(R0)* .-ENABLE PARITY (OR UNIBUS MEM ECC) NOTIF 
R0j*$PARTB»2*<16.*2> ;DONE YET? 
10$ ;1F LO NO 



000001 



.END 



TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
1M108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 
TM108 



•••• 6 1 **** 



PARTY MACRO Mil 08 .h-DEC-77 20:04 PAGf 2-8 



PARTY MACRO Ml 108 iH-DEC-77 20:0A PAGE 2-8 
SYMBOL TABLE 



KJ»LOC.= 000001 
IC$STPS= 00007A 
M$SCRB= 0001 2A 
R$$F11= 000001 
RStJPO=-- 000000 



R«JP1= 000001 
RSSJSI^ 000001 
R$SK11= 000001 
RS$P11= 000001 
RSSX11= 000001 



CSSORE= OOOAOO 
H»»RTZ= 00007A 
K$$CNT- 1775A6 
K»»CSR= 1775A6 
ICttIEN= 000115 

. ABS. 000000 000 
000000 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 1120 WORDS ( 5 PAGES) 
DYNAMIC MEMORY: I57AA WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:13 
CA1.203PARTY,S'0:CA1.30]PARTY/-SP=C1.1]EXEMC/ML.W1.101R5X«C.i:i1,10]PARTY 



RSSIIMr 000000 

Rssns:^ 000000 

s$$Erc= 000000 

S$$YSZ= 001000 

TSSA11= 000001 



T$$C11= 000001 
T$$J16= 000001 
r$$KMG= 000000 
T$»M11= 000001 
V$$CTR= 000400 



•••• H 1 •••• 




*t** I 1 **** 



PtSUB MACRO mi08 U-0EC-T7 ?0:0<i PAGE 2 



PLSUB MACRO NIIOS U-DEC-77 20:0A PAGE 2 



1 



.TITLE PLSUB 
, I DENT /OO/ 



COPYRIGHT (C) 1976 

DIGITAL EQUlPf^ENT CORPORATION, MAYNARD. MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 00 

T. J. MILLER 8-MAR-76 

PROGRAM LOGICAL ADDRESS SPACE 'PLAS) COMMON SUBROUTINES 

MACRO LIBRARY CALLS 



.IF DF P$$LAS 

.MCALL HDRDFS.HWODFS.PCBDFSJCBDFS 

HDRDFS .-DEFINE TASK HEADER OFFSETS 

HWDDFS .-DEFINE HARDWARE REGISTERS 

PCBDFS .-DEFINE PARTITION CONTROL BLOCK OFFSETS 

TCBDFS .-DEFINE TASK CONTROL BLOCK OFFSETS 

**-SSRNAM-SEARCH FOR NAMED PARTITION 

THIS ROUTINE SEARCHES FOR A NAMED PARTITION AND RETURNS A SUCCESS/ 
FAILURE INDICATION AND A POINTER TO THE PCB IF FOUND. 

INPUTS: 

R3«P0INTER TO DOUBLE-WORD RADSO NAME 
OUTPUTS: 

C'1 IF NO MATCH ON NAME 

C*0 IF NAMED PARTITION FOUND 
R2=PCB ADDRESS 



tSRNAM: :M0/ 

101: CMP 

BNE 

CMP 

BEQ 

20t: 



SPARHD.R? 

P.NAM(R2),(R!) 

20$ 



.-POINT TO FIRST PCB IN IHt LIST 

.-MATCH ON FIRST WOkD OF NAME? 

;IF NE NO 
P.NAM»2(R2).2(R5) ;HATCH ON SECOND WORD OF NAME? 
501 ;IF EQ YES 

iREF LABEL 



.IF OF Dt»VNM|M$»MGE 

BIT «PS.SYS,P.STAT(R2) ;SYS1EM CONTROLLED PARIITION? 



•••• J 1 •••• 



! 

I Pi SUB 



MACRO Ml 108 U-DEC-77 20 rOA PAGE 2-1 



PlSUB macro M1108 U-DEC-77 20:0A PAGE 2-1 



30»: 


BEQ 

TST 

BEQ 

MOV 

BR 

MOV 

.ENDC 


40S 

P.SUB(R2) 

30S 

P.SUB(R2).R2 

10S 

P.MAIN(R2),R2 


IF EQ NO 

IS THERE ANOTHER SUBPARTITION? 

IF FQ NO 

POINT TO NEXT SYS SUBPARTITION 

POINT BACK TO MAIN PCB 


(,0% 
50$: 


MOV 
BNE 
SEC 
RETURN 


(R2).R2 
10$ 


POINT TO NEXT PCB (P.LNK) 
IF NE THERE IS ONE 
•RETURN C=1 



••-$CICACC-CHEC< DESIRED ACCESS 

THIS ROUTINE CHECKS IF THE DESIRED ACCESS OF A TASK TO A REGION 
IS ALLOWED. THE BITS IN THE PROTECTION WORD ARE ARRANGED IN ThF 
FOLLOWING ORDER: 

; [WORLD. GROUP. OWNER. SYSTEM] 
t 15 

THE BITS WITHIN EACH CATEGORY IN THE PROTECTION WORD ARE ARRANGED 
IN THE FOLLOWING ORDER: 



DELETE 
3 



EXTEND 
2 



WRITE 
1 



READ 




; 
; 



A BIT SET MEANS THE CORRESPONDING ACCESS IS NOT ALLOWED. 

INPUTS: 

RO*DESIRED ACCESS MASK IN LOW FOUR BITS 
R1»CURRENT UK OF T'SK 
R2cpCB ADDRESS OF REGION 

OUTPUTS: 

R0.R1 Ar^E MODIFIED 

DIRECTIVE STATUS OF D.RS16 RETURNED IF ACCESS DENIED. 



tCKACC: 
101: 



20S: 



:MOV 

eic 

SWAB 
CALL 
BNE 
BIT 

BNE 
TST 

Nt I URN 
ASL 
ASL 



#30$. -(SP) 

#*C17.R0 

R1 

a(SP)* 

20$ 

R0.P.PRO(R2) 

20i 

(SP)» 



PUSH COROUTINE ADDRESS 

CLEAR ALL BUT DESIRED ArCF'".- MASK 

REVERSE GROUP AND OWNER IN Uii. WORD 

CHECK IF QUALIFIED IN NEXT CATEGORY 

IF NE NO 

ALLOWED ACCESS IN THIS CATEGORY. 

IF NE NO 

POP COROUTINE ADDRESS 

RETURN TO CAlLFR 

SHIFT MASK TO NEXT CATEGORY 



•••* K t *•*• 



PISUB MACRO M1108 U-DEC-77 20:0A PAGF 2-2 



PLSUB MACRO HI 108 U-OEC-77 20:0A PAGE 2-2 



301: 
AOS: 



ASL 


RO 




ASL 


RO 




BR 


10S 


CHECK ACCESS IN THIS CATEGORY 


CMPB 


R1.#10 


SYSTEM UK? 


BHI 


AGS 


IF HI NO 


SEZ 




SET FLAG FOR ACCESS CHECK 


CALL 


acsp)* 


CHE<:K ACCESS AND SHIFT MASK 


C«P 


R1,P.0yN(R2) 


OWNER UK? 


CALL 


a(SP)+ 


CHECK ACCESS AND SHIFT MASK 


CHRP 


R1.P.0yN*1(R2) 


•SAME GROUP? 


CALL 


a(SP)t 


■CHECK ACCESS AND SHIFT MASK 


SEZ 




INSURE CHECK FOR WORLD ACCESS 


CALL 


a(SP)t 


CHECK ACCESS 


DRSTS 


D.RS16 


■ACCESS DENIED IF WE GET HERE 



•♦-$CRATT-CREATC ATTACHMENT DESCRIPTOR 

THIS ROUTINE CREATES AN ATTACHMENT DESCRIPTOR AND INSERTS IT IN THE 
NECESSARY QUEUES. 



INPUTS: 



R2«PCr ADDnESS of REGION BEING ATTACHED TO 

R«=ACCESS CODE 

RSsTCB ADDRESS OF ATTACHING TASK 



OUTPUTS: 



C-0 IF SUCCESSFUL 

RIsADDRESS OF ATTACHMENT DESCRIPTOR 

RO IS MODIFIED 
C=1 IF AN ATTACHMENT DESCRIPTOR COULD NOT BE ALLOCATED 

RO.RI ARE MODIFIED 



SAVE R3 

SAVE PCB ADDRESS 

PICK UP ATTACHMENT DESCRIPTOR SIZE 

ALLOCATE THE ATTACHMENT I 'CRIPTOR 

IF CS ALLOCATION FAILURE 

POINT PAST END OF ATTACHMENT DESCRIPTO'< 

SET PCB ADDRESS (A. PCB) 

INIT STATUS AND MAP COUNT (A.STS) 

CLEAR ALL BUT ACCESS BITS (A.ST:S) 

POINT TO TCBL THREAD WORD (A.TCBD 

POINT TO TCB ATTACHMENT LISTHEAD 

INSERT DESCRIPTOR AT END OF QUEUE 

SET TCB ADDRESS (A. TCB) 

ZERO I/O COUNT (A. IOC) 

INIT PRIORITY TO TASK PRIORITY (A.PRI) 

POINT TO PCBL THREAD (A.PfBL) 

POINT TO PCB ATTACHMENT LlSIHEAD 

INSERT IN QUEUE BY PRIORITY 
INDICATE SUCCESS 



SCRATT::MOV 


R3.-(SP) 


MOV 


R2.-(SP) 


MOV 


#A.LGTH,R1 


CALL 


SALOCB 


BCS 


10$ 


ADD 


RO.RI 


MOV 


(SP),-(Rn 


MOV 


R«.-(R1) 


BK 


#*C17.(R1) 


TST 


-(R1) 


MOV 


R5,R0 


ADD 


#T.ATT.RO 


CALL 


tOINSF 


MOV 


R5.-(R1) 


CLRB 


-(RU 


MOVB 


T.PRI(R5).-(R1) 


TST 


-(R1) 


MOV 


(SP),RO 


ADD 


tP.ATT.RO 


CALL 


SQINSP 


CLC 





•••ft I 1 •••• 



PLSUB MACHO M1108 U-DfC-77 20:04 PAGf 2-8 



PLSUB MACRO mi08 U-DEC-77 20:0A PAGE 2-3 



172 
173 
174 

175 
176 
177 
178 
179 
180 
181 
182 

18S 
186 
187 
188 
189 
190 
191 
192 
193 
194 
195 
196 
197 
198 
199 
200 
201 
202 
203 
204 
205 
206 
207 
208 
209 
210 
211 
212 
213 

^^^, 

215 
216 
217 
218 
219 
220 
221 



10$: 



MOV 
MOV 
RETURN 



(SP)*.R2 
(SP)*,R3 



RESTORE PCB ADDRESS 
RESTORE R3 



*»-$if«ATT-SEARCH FOR ATTACHMENT DESCRIPTOR 

THIS ROUTINE VERFIES IF A VALID REGION ID WAS PASSED IN A PLAS DIRECTIVE 
BY SEARCHING FOR THE CORRESPONDING ATTACHMENT DESCRIPTOR IN THE TCB'S 
ATTACHMENT QUEUE. 

INPUTS: 

(R3)=REGI0N ID TO VERIFY (OR TO IMPLY TASK REGION) 
RS^TCJ ADDRESS OF CURRENT TASK 

OUTPUTS: 

R5::ADDRESS OF ATTACHMENT DESCRIPTOR 

D.RS86 IS RETURNED IF THE ATTACHMENT DESCRIPTOR CANNOT BE FOUND. 



$SRATT: 



10S: 



20$: 



:MOV 
NOV 
BEQ 
ADD 
CMP 
BEQ 
MOV 
BNE 
DRSTS 
SUB 
TST 
RETURN 



T.ATT(R5).R5 

(R3),-(SP) 

20$ 

«A.TCBL.(SP) 

R5.(SP) 

20$ 

(R5).R5 

10$ 

D.RS86 

#A.rC8L.R5 

(SP)» 



POINT TO FIRST ATTACHMENT DESCRIPTOR 

DEFAULT TO TASK REGION? 

IF EQ YES 

ADD BIAS TO LINK WORD 

MATCH OH THIS DESCRIPTOR"; 

IF EQ YES 

ELSE POINT TO NEXT DESCRIPTOR (A.TCBD 

IF NE THERE IS ONE 

INVALID REGION ID 

POINT TO START OF ATTACHMENT DESCRIPTOR 

CLEAN STACK 



**-$SRWND-SEARCH FOR SPECIFIED ADDRESS WINDOW 

THIS ROUTINE VERIFIES THAT THE SPECIFIED ADDRESS W'NDOW ID CORRESPONDS 
TO A VALID ESTABLISHED ^DDRESS WINDOW. 



INPUTS: 



(R3) 'ADDRESS WINDOW ID 
R4>ADDRESS OF CURRENT TASK HEADER 



OUTPUTS: 



t 
I 
t 

i 

J* 

$SRWND: 



M^POI^TFR TO SPECIFIED WINDOW BLOCK 
RO IS ..fc;>lFIED. 

D.RS87 IS ReT;^;.ED IF THE SPECIFIED ADDRESS WINDOW IS INVALID 



:MOV H.WNP<A4).R4 .-POINT TO NUMBER OF WINDOWS 
M0v8 (R3),R0 .PICK UP ADDRESS WINDOW ID (W.NID) 



•••• M 1 •••« 



PLSUB MACRO M1108 U-DEC-77 ?0: 04 PAGF 2-4 



1 



PLSUB MACRO Ml 108 U-OEC-77 20:0A 



229 
250 
231 
232 
233 
23A 
235 
236 
237 
258 
239 
2A0 
2A1 
242 
2A3 
2AA 
245 
246 
247 
24d 
249 
250 
251 
252 
25? 
254 
25:1 
256 
257 
258 
259 
260 
261 
262 
2i3 
264 
265 
266 
if67 
268 
269 
270 
271 
^72 
27i 
27U 
275 
276 
277 
27b 
?79 



000001 



PAGE 2-4 








BEQ 


10$ 




CMP 


R0.(R4)* 




BHIS 


10s 




ASL 


RO 




ASL 


RO 




ASl 


RO 




ASL 


RO 




ADD 


R0.R4 




TST 


U.BSIZ(R4) 




BEQ 


10s 




RETURN 




10S: 


DRSTS 


D.RS87 



IF EQ ILLEGAL 

WINDOW ID TOO LARGE? 

IF HIS YES 

CONVERT WINDOW ID TO 8 WORD OFFSET 



POINT TO ADDRESS WINDOW 

IS IT AN ESTABLISHED ADDRESS WINDOW? 

IF EQ NO 

INVALID ADDRESS WINDOW 

;♦ 

; **-SUNMAP-UNnAP ADDRESS WINDOW 

; THIS ROUTINE SEARCHES FOR AND CONDITIONALLY UNMAPS THE SPECIFIED 
: ADDRESS WINDOW. 

• INPUTS: 

• 

; R4sADDRESS OF i^INDOW TO BE UNMAPPED 
; OUTPUTS: 



; 


RO IS MODIFIED 




t 


C«1 IF 


UNMAPPING WAS PERFORMED 




.ENABl 


LS8 




fUNMAP: 


:TST 


(R4) 


IS WINDOW MAPPED? (W.BPCB) 




BEQ 


20$ 


IF EQ IT IS NOT MAPPED 




MOV 


RI.-(SP) 


SAVE R1 




CLR 


(R4) 


UNMAP AD 9ESS WINDOW (W.BPCB) 




MOV 


W.aATT(R4).R0 


PICK UP ' DRESS OF ATTACHMENT DESCRIPTOR 




CLR 


W.BATT(R4) 


CLEAR A /CHMENT DESCRIPTOR POINTER 




DECB 


A.MPCT(RO) 


DErR'JMF • MAPPING COUNT 




MOV 


A.TCB(RO),ni 


POli^T ASK TCB ADDRFSS 




MOVB 


W.BFPD(R4),R0 


POINT J FIRST USER PDR 


lot: 


BIT 


#T3.PRV.T.ST3{R1 


;IS 1HE TASK PRIVILEGED? 




BEQ 


14$ 


/ cQ NO 




MOV 


KISAR0-UISDRO(RO 


l,UISARO-UISDRO(RO) .-RESTORE PRV MAPPING 




MOV 


#77406, (RO)* 






BR 


15$ 




14$: 


CLR 


(RO)* 


CLEAR NE)(T USER PDR 


15$: 


DECB 


W.aNI'D(R4) 


DONE YET? 




BCT 


10$ 


IF GY NO 




MOV 


(SP)*,R1 


RESTORE R1 




SEC 




RETURN CS FOR WINDOW UNMAPPED 


20$: 


RETURN 







.ENDC 



.END 



•••• (4 t **«« 



PLSUB MACRO Ml 108 U-OFC-77 20:0A PAGE 2-5 
SYMBOL TABLE 



K$*LDC= 000001 
K$JTPS= 00007A 
M»$CRB= 0001 2A 
R$»F11= 000001 
RS$JPO= 000000 



r$$jp:= 000001 

R$$JS1= 000001 
R$$K11- 000001 
R$»P11= 000001 
RS$X11= 000001 



C»$ORE= OOOAOO 
H»»RTZ= 00007A 
KS»CNT= 1775A6 
IC»»CSP= 177546 
K»$IEN-^ 000115 

. ABS. 000000 000 
000000 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 1120 WORDS ( 5 PAGES) 
DYNAMIC MEMORY: 157AA WORDS ( 60 PAGES) 
ELAPSED TIME: )0:00:11 

CA1.20]PLSOB,SY0:C41.30]PLSUB/-SPsC1.1]EXEMC/ML.U1,103RSXMC.C11.10]PLSUB 
of •' 



RSSIIM- 000000 
RStllS^ 000000 
S»$E CC= 000000 
SS»YSZ= 001000 
TS$A11= 000001 



T$$C11= 000001 
T$$J16= 000001 
T»SKMG= 000000 
T$$M11= 000001 
VS$CTR= 000400 



•••• I 2 •••• 



11 I 1 




*••* c 2 **** 



onjcb MArbn Mima i/..ncr.77 3n-n^ P»at 7 



POWER MACRO Ml 108 1A-0EC-77 20:0A PAGE 2 



1 

2 

3 

U 

5 

6 

7 

8 

9 
10 
11 
12 
13 
U 
15 
16 
17 
18 
19 
20 
21 
21 
23 
2A 
25 
26 
27 
28 
29 
30 
31 
32 
33 
3A 
35 
36 
37 
38 
39 
40 
A1 
42 
A3 
AA 
A5 
A6 
A7 
A8 
49 
50 
51 
52 
53 

5A 000000 
55 000000 



.TITLE POWER 
.lOENT /07/ 



COPYRIGHT (C) 197A, 1978 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AN!) MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 07 

D. N. CUTLER 1-OCT-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
C. A. D'ELIA 
T. J. MILLER 

MODIFIED BY: 

T. J. MILLER 1-JUL-77 

TM093 — FIX BUG IN POWERFAIL SUPPORT FOR 11/3A AND 
11/60 PROCESSORS WITH FLOATING POINT SUPPORT. 

TM09A — QUEUE AN ERROR MESSAGE BLOCK TO THE ERROR 
LOGGER ON POWERFAIL. 

T. J. MILLER 1A-SEP-77 

TM101 — CHANGE TO NOT ATTEMPT TO QUEUE A POWERFAIL AST 
TO NULL TASK. 

TM10A — SAVE PIRQ REGISTER IF IT EXISTS FOR FLOATING 
POINT SUPPORT. 

TM105 — ADDITION OF CALL TO USER-WRITTEN ROUTINE AT 
POWER DOWN TRAP. 

TMIOS — CALL COMMON ROUTINE TO CLEAR MEMORY PARITY CSR'S. 
T. J. MILLER 2-NOV-77 

TM103 -- USE NEW LITERAL TO RENABLE CLOCK. 
POWERFAIL RECOVERY 
MAC90 LIBRARY CALLS 



.MCALL EMBDFS.HDRDFt.HWDDFt.PCBDFt.TCBDFS 

EMBDFt .-DEFINE tRROR MESSAGE BLOCK OFFSETS 

HDRDFS .DEFINE TASK HEADER OFFSETS 

HWDDFt ; DEFINE HARDWARE REGISTERS 

PCBDFt ;DEFtNE PARTITION CONTROL BLOCK OFFSETS 



TM09A 
TM09A 



•••• 2 ***' 



»k.f^t\ Miink i/.-Aer.77 an.n/. dare 3.1 



58 000000 

59 

60 

61 

62 

63 

6A 

65 

66 

67 

68 

69 

70 

71 

72 

73 

7A 

75 

76 

71 

78 

79 

80 

81 

82 

83 

84 

85 

86 

87 

88 

89 

90 

91 

92 

93 

9A 

95 

96 

97 

98 

99 
100 
101 
102 
103 
10A 
105 
106 
107 
108 
109 
110 
111 

1 12 000000 

113 000024 
1U 000024 000000' 



DEC-77 20:04 


PAGE 2-1 








TCBDFS 




.-DEFINE TASK CONTROL BLOCK OFFSETS 






LOCAL DATA 










VOLATILE REGISTER STORAGE 






• IF DF 


P$$RFL 






PUBTM: .BLKW 


7 


;R0 THRU RS AND SP 




.IF DF 


nSSMGE 






.IF DF 


NSSEXT 






.BLKW 


<31.-5.>*2 


.-UNIBUS MAPPING REGISTERS 




.ENDC 








.BLKW 


25. 


.•MEMORY MANAGEMENT REGISTERS 




.IFF 








.IF DF 


E$SEAE 






.BLKW 


3 


;EAE REGISTERS 




.ENDC 








.ENDC 










.IF DF 


F$IL"P 





PWSTK«. 


-2 




; POWERFAIL VECTOR 




.IFTF 




.=24 

PWVCT: 


.ASECT 
.WORD 


PDOWN 



.-FLOATING POINT REGISTERS 



;RE.' LABEL 



; TM104 



•••* E 2 **** 



PQWIR M RO M1108 U-DEC-77 20:04 PAGF l-l 



POWER MACRO Ml 108 U-DEC-7 20:0A PAGE 2-2 



115 000026 

116 000000 
117 

118 

119 

120 

121 

122 

123 

12* 

12'i 

126 

127 000000 

128 

129 

130 

131 

132 

133 

13* 

135 

136 

137 

138 

139 

140 

U1 

U2 

U3 

U* 

U5 

U6 

M>7 

U8 

U9 

150 

151 

152 

i 

158 
159 
160 
161 
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 



0003A0 



.WORD PR7 
.PSECT 



**-PDOWN-POWERFAIL INTERRUPT (DOWN) 



THIS ROUTINE IS ENTERED AS A RESULT OF A POWER DOWN INTERRUPT. ALL 
VOLATILE MACHINE REGISTERS ARE SAVED, THE POWERFAIL VECTOR IS SWITCHED 
TO THE POWER UP ROUTINE, AND THE PROCESSOR IS HALTED TO AWAIT THE 
POWER UP INTERRUPT. 



PDOWN: 



20S: 



lot: 



.IFT 



MOV 


SP.PWSTK 


MOV 


#PWSTIC,SP 


MOV 


R5.-{SP) 


MOV 


RA,-(SP) 


MOV 


R', -(SP) 


MOV 


^2.-(SP) 


MOV 


R1,-(SP) 


MOV 


RO,-(SP) 



MOV 
MOV 
MOV 
MOV 
DEC 
BGT 

.ENDC 



BIS 

MFPl 

MOV 

MOV 

MOV 

MOV 

MOV 

MOV 

MOV 

DEC 

BGT 

.IFF 



;REF LABEL 



SAVE CURRENT STACK POINTER 

SET ADDRESS OF REGISTER SAVE AREA 

SAVE REGISTERS R5 THRU RO 



.IF DF MtSMGE 



.IF DF MSSEXT 



#UBMPR*<31.*A>.R0 .-.-jPOINT PAST LAST MAP REGISTER 



«1.-5..R1 

-(RO).-(SP) 

-{RO).-(SP) 

R1 

20$ 



fPMODE.PS 

SP 

#KISAR0*16..R0 

#UISAR0>16..R1 

#UISDR0H6..R2 

«8..R3 

-(RO),-(SP) 

-(RI).-(SP) 

-(R2).-(SP) 

R3 

lot 



;SET COUNT OF REGISTERS TO "SAVE 
;SAVE HIGH 6 BITS OF ADDRES. 
:SAVE LOW 16 BITS OF ADDRE^iS 
;ANY MORE TO SAVE? 
;IF GT YES 



.MAKE SURE PREVIOUS MODE IS USER 
;SAVE USER STACK POINTER 
;POINT TO KERNEL ADDRESS REGISTER 7*2 
.•POINT TO USER ADDRESS REGISTFR 7*2 
•.POINT TO USER DESCRIP OR REGi.>TER 7*2 
SET LOOP COUNT 

;SAVE KERNEL ADDRESS R GISTER 
;SAVE USER ADDRESS REGISTER 
;SAVE USER DESCRIPTOR REGISTER 
; ANYMORE TO SAVE? 
;1F GT YES 



•••* 



TT 



•••* 



POWER MAfRO Ml 108 U-DEC-77 20:04 PAGE 2-3 



POWER MACRO Ml 108 1A-DEC-77 20:0A PAGE 2-3 



( 



30t: 



217 

>18 000000 000000 



.IF DF ESSEAE 



MOV 


SC.-(SP) 


;;;SAVE EAE SHIFT COUNT 


MOV 


AC.-(SP) 


;::SAVE EAE ACCUMULATOR 


MOV 


MQ.-(SP) 


;;;SAVE EAE MULTIPLIER-QUOTIENT 



.ENDC 



.ENDC 



.ENDC 

HALT 
.IFT 



.IF DF FSSLPP 



STFPS 


-(SP) 


SETD 




STD 


RO,-(SP) 


STD 


RI.-(SP) 


STD 


R2.-(SP) 


STD 


R3.-(SP) 


LDD 


R4,R0 


STD 


RO.-(SP) 


LDD 


R5,R0 


STD 


RO,-(SP) 


CLR 


-(SP) 


CMP 


a#244.#SFPPR7 


BEQ 


30$ 


MOV 


«PIRQ.(SP) 


MOV 


a(SP),-(SP) 


.ENDC 




MOV 


fPUP.PWVCT 


.IFTF 




.IF DF 


ItlPPF 


MOV 


WPCSPF.SP 


CALL 


(SP) 



STORE FLOATING POlNf STATUS 
SET FLOATING DOUBLE MODE 
SAVE FLOATING POINT REGISTERS 



til 
III 
til 
III 
til 



PUSH AN ADDRESS OF ZERO 

IS THERE A PIRQ REGISTER TO SAVE? 

IF EQ NO, DO DUMMY SAVE OF LOCATION 

SET FOR SAVE OF PIRQ 

SAVE PIRQ REGISTER OR CONTENTS OF 



;;;SWITCH TO POWER UP ROUTINE 



TM10A 
TM10A 
1M10A 
TM10A 
TM10A 
♦ ♦-9 



;;;SET STACK POINTER 

;;:CALL USER POWER FAR ROUTINE 



;;;WA1T FOR SOME JUICE! 



TM105 
TM105 
TM105 
TM105 
TM105 
TM105 
TM105 
TM105 
TM105 



•♦-PUP-POWERFAIL INTERRUPT (UP) 

THIS ROUTINE IS ENTERED AS A RESULT OF A POWER UP INTERRUPT. ALL VOLATILE 
MACHINE REGISTERS ARE RESTORED, A SCHEDULE REQUEST IS fORfFP FOR THE 
NULL TASK, THE POWERFAIL T^DICATOR IS INCREMENTED, AND AN RTl IS 
EXECUTED. AT THE APPROPRIATE TINE THE DISPATCHER WILL CALL THE POWER 



•••• 



TT 



#•*• 



POWER MACRO MllOi? U-OEC-77 ?0:0<i PAGE 2-4 



POWER MACRO Ml 103 1A-DEC-77 20:0« PAGE 2-A 



; RECOVERY ROUTINE TO ACTUALLY PROCESS THE POWER FAILURE. 

* 

PUP: MOV #PWBTM.SP ;; .'POINT TO LAST REGISTER SAVED 



a] 

ss 

I 



10S: 



20$: 



iO%i 



.IF DF 


F$$LPP 


MOV 


(SP)*.a(SP)< 


SETD 




LDD 


(SP)*.RO 


STD 


R0.R5 


LDD 


(SP)*.RO 


STD 


RO.RA 


LDD 


(SP)*.R3 


LDD 


(SP)*.R2 


LDD 


(SP)*.R1 


LDD 


(SP)*,RO 


LDFPS 


(SP)* 



.ENDC 



.IF DF MSSMGE 



BIS 

MOV 
MOV 
MOV 
MOV 
MOV 
MOV 
MOV 
MOV 
MOV 
DEC 
BGT 
INC 
MTPI 



MOV 
MOV 
CLR 
MOV 
CLR 
ADD 
DEC 
BGT 
MOV 
MOV 
MOV 
DEC 

Bcr 

MOV 



fPMODE.PS 

IVKISARO.RO 

«KISDR0.R1 

#UISAR0,R2 

«U1SDRC,R3 

«8.,RA 

(SP)»,{R3)t 

(SP)*,(R?)» 

#77*06. (RD* 

(SP)*.(RO)* 

R4 

10$ 

SRO 

SP 



.IF DF MSIEXT 



#UBMPR.RO 

#5..R1 

R2 

R2,(R0)* 

(R0)» 

#20000. R2 

20% 

#31.-5..R1 

(SP)»,(RO)* 

(SP)*.(RO)* 

R1 

301 

#60,SR3 



CONDITIONALLY RESTORE PIRQ OR LOC. ; TM10A 
SET FLOATING DOUBLE MODE ;**-8 

RESTORE FLOATING POINT REGISTERS 



;;; 
tii 
tit 

• • • 

•••RESTORE FLOATING POINT STATUS 



SET PREVIOUS MODE TO USER 

POINT TO KERNEL ADDRESS REGISTER 

POINT TO KERNEL DESCRIPTOR REGISTER 

POINT TO USER ADDRESS REGISTER 

POINT TO USER DESCRIPTOR REGISTER 

SET LOOP COUNT 

RESTORE USER DESCRIPTOR REGISTER 

RESTORE USER ADDRESS REGISTER 

RESTORE KERNEL DESCRIPTOR REGISTER 

RESTORE KERNEL ADDRESS REGISTER 

ANY MORE TO RESTORE? 

IF CT YES 

TURN ON MEMORY MANAGEMENT 

RESTORE USER STACK POINTER 



POINT TO FIRST MAP REGISTER 
SET COUNT OF EXEC REGISTERS 
CLEAR STARTING ADDRESS 
LOAD LOW 16 BITS OF ADDRESS 
CLEAR HIGH 6 BITS OF ADDRESS 
ADVANCE 8K BYTES 
ANY MORE TO LOAD? 
IF GT YES 

SET COUNT OF REGISTERS 
RESTORE LOW 16 BITS OF ADDRESS 
RESTORE HIGH 6 BITS OF ADDRESS 
ANY MORE REGISTERS 
IF GT YES 



ENABLE 22 BIT AND UNIBUS MAP 



•*** H i *•** 



POWER MACRO M1108 U-OEC-77 20:04 PAGF 2-5 



POWER MACRO Ml 108 U-DEC-77 20:04 PAGE 2-5 



' 



.ENDC 






.IFF 






• IF OF 


ESSEAE 




MOV 
MOV 
MOV 


(SP)*,MQ 
(SP)*,AC 
(SP)*.SC 


;;;RESTORE EAfc UTIPLIER-QUOTIENT 
;;;RESTORE EAE ACCUMULATOR 
;;;RESTORE EAE SHIFT COUNT 


.ENDC 






.ENDC 







MOV 


(SP)*.RO 


MOV 


(SP)*.R1 


MOV 


(SP)t,R2 


MOV 


(SP)».R3 


MOV 


(SP)*.R« 


MOV 


{SP)*,R5 


MOV 


(SP).SP 


INC 


SPWRFL 


MOV 


«SHEADR,SRQSCH 


MOV 


«PDOWN.PWVCT 


.IF NOF 


Lsssn 


MOV 


SCKLDCaSCKCNT 


MOV 


<N(tSIEN.aSCKCS 



;;;RESTORE RO THRU R5 

;;; 
;;; 
ttt 
I 



RESTORE STACK POINTER 

INDICATE A POWER FAILURE HAS OCCURED 

FORCE REDISPATCHING 

SWITCH TO POWER DOWN ROUTINE 



;;;RELOAD ClOCK COUNT REGISTER 



.ENDC 



RTI 



; TM105 



tii 



**-$POWER-POWtR FAP RECOVERY 



335 

536 000002 005067 

357 000006 

238 



OOOOOOG 



.mf 




.ENABL 


Lse 


tPOWER::CLR 
CALL 


tPWRFL 
SDRDSE 


.IF OF 


IC$$W1 1 


CLH 


KUWIU? 



;CLEAR FAILURE INDICATOR 
.-DECLARE A SIGNIFICANT EVENT 



.'CLEAR CLOCK ERROR FLAGS 



•••• j 2 •#•« 



POWEM MACRO M1108 U-OEC-77 20:04 PAGF 2-6 



POyEH MACRO mi08 U-DEC-77 20:0A PAGE 2-6 



s 



MOV 
.ENDC 



iri,KSSWlU6 



; ENERGIZE OUTPUT RELAY 



.IF DF P$$RTY 

CALL SCLPAR 

nOV SMPCSRt6.R0 



.IF DF PSSD70 



CLR 
CLR 

.IFF 



V¥>CTL 
(RO) 



;CLEAR MEMORY PARITY CSR'S 

;PICK UP 11/70 CACHE CSR REGISTER 



.•CLEAR 11/70 PARITY CONTROL REGISTER 



; TM108 
.•♦*-4 



MOV #3.(R0) .-DISABLE TRAPS 
.ENDC 



MOV 


#177777.-(R0) 




■CLEAR MEMORY ERROR REGISTER 




.ENDC 








.IF DF 


E$tDVC!ESSNSI 


EttPER 


• TM09A 
TM09A 


MOV 


#E.SEQ»«.R1 




SET SIZE OF EMB TO ALLOCATE 


TM09A 


MOV 


iEC.PWR.-(SP) 




PUSH POWERFAIL CODE 


TM09A 


CALL 


SALEMB 




ALLOCATE A P0WE1FAIL EMB 


TM09A 


BCS 


6S 




IF CS COULD NO', ALLOCATE 


TM09A 


CALL 


SQEMB 




QUEUE THE EMB FOR THE ERROR LOGGER 
REF LABEL 


TM09A 
TM09A 








TM09A 


.ENDC 






TM09A 
TM09A 










TM09A 



6S: 



; EFFECT POWERFAIL AST'S FOR TASKS THAT ARE ACTIVE AND IN CORE 

; 



.m 



.IF DF AtSTRP 

MOV SACTHD.R5 ;GET ADDRESS 0' FIRST TCB 

101: MOV #H.PFVA.R4 ;SET OFFSET TO AST CONTROL BLOCK IN HEADER 

MOV T.ACTL(R5).-(SP) ;SAVE POINTER TO NEXT ACTIVE TASK 

BFO 151 ;|F EQ THERE IS NONE 

CALL IDASTT .-DECLARE POWERFAIL AST 

15li MOV (SP)».R5 .-GET ADDRESS Of NEKT ACtlVE TASK 

BNF lot :tF NE NO 



TM1Q1 
TM101 

TM101 
•-1 



•••• J 2 **** 



MWIR MACRO M1108 U-DEC-77 ?0:0A PAGF ?-7 



1 



POWER MACRO «1108 U-DEC-77 20:04 PAGE l-l 

400 -ENDC 



AC 

A08 

409 000012 

410 000016 

411 000020 

412 000022 

413 000024 

414 000032 

415 000034 

416 000042 

417 000044 

418 000050 

419 000052 

420 000056 
421 



433 000060 




132765 
001371 
132765 
001003 
105765 
100362 
016302 
001757 



000752 



DO POWERFAIL RECOVERY FOR ALL ACTIVE DEVICES 



012746 OOOOOOG 
103001 



20$: 
30S: 



OOOOOOG OOOOOOG 40S: 
OOOOOOG OOOOOOG 



OOOOOOG 
OOOOOOG 



SOS: 



ILDPUF: 



5SS: 



.IFTF 

MOV 

CALL 

BCC 

RETURN 

BITB 

BNE 

BITB 

BNE 

TSTB 

BPL 

MOV 

BEQ 



#$SCDVT.- 

a(SP)* 

40S 



(SP) 



SET ADDRESS OF DEVICE TABLE SCANNING CO-ROUTINE 
GET NEXT UCB ADDRCSS 
IF CC GOT ONE 



«US.0FL.U.ST2(R5) .'DEVICE IN CONFIGURATION? 

30$ 'IF NE NO 

#UC.PWF.U.CTL{R5) ;CALL DRIVER REGARDLESS OF ACTIVITY? 



50$ 

U.STS(R5) 

30$ 

D.DSP(R3),R2 

30$ 



.IF DF L$$DRV(M$$MGE 

:MOV KISAR5,-(SP) 

MOV D.PCB(R3).R3 

BEQ 55$ 



MOV 



P.REL(R3).ICISA'- ;HmP THE DRIVER 



IF NE YES 

IS UNIT ACTIVE? 

IF PL NO 

GET ADDRESS UF DRIVER DISPATCH TABLE 

iF EQ DRIVER NOT LOADED 



SAVE APR5 (REF LABEL FOR 'LOAD') 

GET DRIVER PCB ADDRESS 

IF EQ DRIVER IS PART OF EXEC 



116403 OOOOOOG 



.IFTF 

MOVB S.C0N(R4).R3 ;GET CONTROLLER INDEX 

; CALL DRIVER AT POWERFAK ENTRY POINT WITH THE ARGUMENTS: 



R3«C0NTR0LLER INDEX. 

R4«ADDRESS OF THE STATUS CONTROL BLOCK. 

R5«ADDRESS OF THE UNIT CONTROL BLOCK. 



CALL aD.VPWF(R2) .'ENTER DRIVER 

.IFT 

MOV (SP)*.KISAR5 .'RESTORE APRS 

.ENDC 



BR 
.ENPC 



30$ 



;G0 AGAIN 



•••• K 2 •••• 



POWER MACRO M1108 l4-DfC-77 20:04 PAGF ?-8 



POWER MACRO Ml 108 H-DEC-77 20:0A PAGE 2-8 



A57 .OSABL LSB 

458 

A59 

A60 000001 .END 



•••• I 2 •••# 



KUM MACRO M1108 U-DEC-77 ?0:04 PAGF 2-9 



POUER 


MACRO mi08 U-DEC-77 20:04 PAGE 


2-9 




SYMBOL 


TABLE 










AS.DEL= 


000010 


FF.CEX= 


020000 


MPAR = 


172100 


AS.EXT= 


000004 


FE.DRV= 


000010 


MPCSR = 


177746 


AS.RED= 


000001 


FE.EXP= 


000200 


N$SCRB= 


000124 


AS.WRT= 


000002 


FE.EXTs 


000001 


PDOUN 


OOOOOOR 


A. IOC 


000003 


FE.EXV= 


000004 


PIRQ r 


U7772 


A.LGTH= 


OOOOU 


FE.LSI= 


000400 


PRO = 


000000 


A.MPCT 


000011 


FE.I«IUP= 


000002 


PR1 = 


000040 


A.PCB 


000012 


FE.«XT= 


040000 


PR4 « 


000200 


A.PCBL 


000000 


FE.NLG- 


100000 


PR5 = 


000240 


A.PRI 


000002 


FE.PKT= 


000100 


PR6 == 


000300 


A.STAT 


000010 


FE.PLA= 


000020 


PR7 = 


000340 


A.TCB 


000004 


HSSRTZs 


000074 


PS 


177776 


A.TCBL 


000006 


H.CSP 


000000 


PS.APRs 


000007 


Ct$ORE» 


000400 


H.CUIC 


000010 


PS.CHIC= 


010000 


D.DSP = 


•*•••• 6X 


H.DSW 


000046 


PS.CKPs 


040000 


O.VPWFs 


*••••• GX 


H.DUIC 


000012 


PS.CKR" 


020000 


EC.DTOs OOOUO 


H.EFLM 


000004 


PS.COFM 


000200 


EC.DVC= 


000001 


H.EFSV 


000040 


PS.DELs 


000010 


EC.INIs 


000040 


H.FCS 


000050 


PS.DRV- 


000020 


EC.LOA> 


000004 


H.FORT 


000052 


PS.FXD- 


004000 


EC.«PE« 


000002 


M.FPSA 


000042 


PS.L10= 


001000 


EC.NSl* 


000141 


H.FPVA 


000034 


PS.NSF= 


000400 


EC.PWR= 


000042 


H.GARD 


000072 


PS.OUT= 


100000 


EC.UNL^ 


000010 


H.HDLN 


000002 


PS. PER* 


002000 


E.ABM 


000014 


H.IPC 


000016 


PS.PICr 


000100 


E.COOE 


000002 


H.IP5 


OOOOU 


PS. SYS* 


000040 


E.FCN 


000034 


H.ISP 


000020 


PWVCT 


000024 


E.IOC 


000021 


H.LUN 


000076 


P.BLKS 


000016 


E.LGTH= 


000056 


H.NLUN 


000074 


P. BUSY 


000024 


E.LOST 


000017 


H.NML 


000061 


P. IOC 


000003 


E.NAK 


000032 


H.ODVA 


000022 


P.LNK 


000000 


E.OPC 


000022 


H.ODVL 


000024 


P. MAIN 


000012 


E.OPS 


000020 


H.OVLV 


000054 


P.NAM 


000004 


E.PAR 


000026 


H.PFVA 


000032 


P. OWN 


000026 


E.PRM 


000036 


H.RCVA 


000036 


P.PRl 


000002 


E.RCNT 


000034 


H.RRVA 


000062 


P.'^^L 


OOOOU 


E.REGS> 


000056 


H.SPRl 


000060 


P. SIZE 


000016 


E.RTRY 


000016 


H.TKVA 


000026 


P.STAT 


000030 


E.SEQ 


000012 


H.TKVI. 


000030 


P. SUB 


000010 


e.si;e 


000000 


H.VEXr 


000056 


P.SWSZ 


000022 


E . TASK 


000022 


H.UND 


000044 


P.TC8 


000026 


e.time 


000004 


K$SCNT« 


177546 


P. WAIT 


000020 


E.UCB 


000032 


KStCSRc 


177546 


RtSF 1 1 * 


000001 


E.UIC 


000030 


KtflENc 


000115 


RStJPOs 


000000 


E.VCTR 


000016 


KSSLDC: 


000001 


RS>JP1 s 


000001 


E.WMV 


000026 


K$tTPS> 


000074 


RSIJS1* 


000001 


FE.CAL* 


000040 








• 


. A8S. 


000102 000 
000072 001 










ERRORS DETECTED: 











RSK1U 

RSSPII* 

RttXl1= 

RSS11M- 

RSS11S- 

SWR = 

SSSECCr 

S$$YSZ= 

S.CON = 

TPS = 

TS.BLK* 

TS.CKFs 

TS.CKR= 

TS.EXE= 

TS.MSGe 

TS.NRP= 

TS.OUT* 

TS.RDN= 

TS.RUN* 

TWAIIs 

T$IC11= 

TtSJl6s 

TS»KMG« 

T»$M11= 

T.ACTL 

T.ASTL 

T.ATT 

T.CPCB 

T.DPRl 

T.EFLG 

T.IOC 

T.LBN 

T.LDV 

T.LNK 

T.HXSZ 

T.NAM 

T.OFF 

T.PCB 

T.PRI 

T.RCVL 

T.RRFL 

T.SRCT 

T.STAT 

T.ST2 

T.ST3 

T.TCBL 



000001 

000001 

000001 

000000 

000000 

177570 

000000 

001000 

•*••** 6X 

177564 

170700 

000200 

000100 

100000 

020000 

010000 

000400 

040000 

004000 

000001 

000001 

000001 

000000 

000001 

000052 

000016 

000054 

000004 

000040 

000022 

U00003 

000041 

000044 

OGOOOO 

000050 

000006 

000060 

000046 

000002 

000012 

000064 

000063 

0C0032 

000034 

000036 

000030 



T.UC8 

T2.A80= 

T2.AST= 

T2.BFX= 

T2.CAF= 

T2.CH»C= 

T2.CKD= 

T2.DST= 

T2.FXD= 

T2.HLT= 

T2.SPN= 

T2.STP= 

T2.TI0= 

T2,WFR= 

T3.ACP= 

T3.CAL* 

T3.CLI« 

T3.MCR= 

T3.NET= 

T3.NSD* 

T3.PM0= 

T3.PRV= 

T3.REM= 

T3.R0V= 

T3.RST= 

T3.SLV= 

UC.PWFx 

US.OFL 

U.CTL = 

U.STS = 

U.ST2 = 

VSSCTR> 

W.BATT 

W.BFPD 

W.BHVR 

W.BLGH 

W.BLPD 

W.BlVR 

W.BNPD 

W.BOFF 

W.BPCB 

W.BSIZ 

»DRDSE= 

IPOWEK 

»PWRFL= 

»SCDVT« 



000026 
000100 
100000 
004000 
000400 
020000 
010000 
040000 
002000 
000200 
000004 
000020 
001000 
000001 
100000 
000100 
001000 
004000 
000020 
000200 
040000 
010000 
020000 
000040 
000400 
002000 
****** 

z ****** 

****** 

****** 



GX 
6X 
GX 
GX 
GX 



00040^^ 
000006 
000014 
000004 
000020 
000016 
000002 
000015 
000012 
000000 
000010 

****** QX 

000002R6 
****** GX 
****** GX 



VIRTUAL MEMORY USED: 4542 WORDS ( 18 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIMt: 00:00:17 

r41.20]POWER.SY0:[4l,30]POWER/-SP«C1.nCXEMC/ML.t4i.i0lK^\'i, .C11 .10]POWfR 



•••t H 2 •••« 




• ••* 



*«•* 



QUEUE MACRO Ml 108 U-OEC-77 20:05 PAGE 2 



.TITLE QUEUE 
. !OENT /05/ 



8 

9 
10 
11 
12 
13 
U 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 

29 000000 

30 000000 
31 

32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
1 

il 

5 



\ 



COPVRIGHT (C) 1974, 1976 

DIGITAL EQUIPMENT CORPORATION, MAVNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 05 

D. N. CUTLER 3-AU6-73 

PREVIOUSLY MODIFIED dY: 

D. N. CUTlER 
C. A. D'ELIA 
T. J. MILLER 

MODIFIED BY: 

GENERAL QUEUE MANIPULATION ROUTINES 

MACRO LIBRARY CALLS 



.MCALL 
CLKDFt 
TCBDFS 



CLKDFt, TCPDFt 



;DEFINE CLOCK QUEUE CONTROL BLOCK OFFSETS 
;DEFINE TASK CONTROL BLOCK OFFSETS 



I* 



•*-SCL INS-CLOCK QUEUE INSERTION 

THIS ROUTINE IS CALLED TO MAKE AN ENTRY IN THE CLOCK QUEUE. THE ENTRY 
IS INSERTED SUCH THAT THE CLOCK QUEUE IS ORDERED IN ASCENDING TIME. 
THUS THE FRONT ENTRIES ARE MOSf IMMINENT AND THE BACK LEAST. 



INPUTS: 



RO'ADDRESS OF THE TLOCK QUEUE ENTRY CORE FIOCK. 

R1-HIGH OTOER HALi* OF DELTA TIME. 

R2«L0W ORD(.ft HALF OF DELTA TIME. 

R4«REQUEST TYPE. 

R5>ADDRESS OF REQUESflh TCB OR REQUEST IDENTIFIER. 



OUTPUTS: 



THE CLOCK QUEUE ENTRY IS INSERTED IN THE CLOCK QUEUE ACCORDING 
TO THE TIME THAT IT WILL COME DUE. 



000000 005020 
000002 110420 



.ENABL 

SCL1NS::CI.R 
MOVB 
INC 
MOV 



(R0)» 
R4.fR0)» 

R5.(R0)» 



.'POINT TO TYPE FIELD AND CLEAR LINK 

;StT REQUEST TYPE 

;ADVAN(F TO TTB ADDRESS 

:SET rCB OR REQUEST IDENTIFIER 



•••• • 3 



*««t 



MArbn Mil AM 1i,_,ft«r-79 SDint DAfiC 3« 1 



1 



QUEUE MACRO MHOS U-DEC-77 20:05 PAGE 2-1 



58 000010 

59 OOOOU 

60 000016 

61 000020 

62 000022 

63 000026 
6A 000030 

65 000032 

66 000034 

67 OOOOAO 

68 0OOOA2 

69 OOOOA-; 

70 000052 

71 00005A 

72 000060 

73 000062 
7A 

75 

76 

77 

78 

79 

80 

81 

82 

83 

8A 

85 00006A 

86 

87 

88 

89 

90 

91 

92 

?3 

94 

95 

96 

97 

98 

99 
100 
101 
102 
103 
104 
i05 000066 

106 000072 

107 000074 

108 0QQ076 

109 0001 CO 

110 00010*. 
000106 
00011? 
0001 U 
000115 



111 

in 

114 



066702 OOOOOOG 

005501 

010220 

010110 

012702 OOOOOOG 

010201 

011102 

001410 

021062 000010 

101372 

103404 

026062 177776 000006 

103365 

162700 000010 

010011 

010210 



012700 
0'0003 
011300 

120460 
001372 
020560 
001567 
011013 
122760 



lOlt 



» 



■lO%: 



BHIS 
SUB 
MOV 
NOV 



SABTIM,R2 

R1 

R2,(R0)* 

RI.(RO) 

nCLKHD.R2 

R2,R1 

(R1).R2 

20$ 

(R0),C.T1M»2(R2) 

10S 

20S 

-2(R0),C.TIM(R:) 

10S 

«8..R0 

RO.(RI) 

R2,(R0) 



: CALCULATE ABSOLUTE TIME WHEN 
.'REQUEST WILL COME DUE 
;SET LOW ORDER PART OF TIME 
;SET HIGH ORDER PART OF TIME 
.'POINT TO CLOCK QUEUE LIST HEAD 
;SAVE ADDRESS OF PREVIOUS ENTRY 
;GET ADDRESS OF NEXT ENTRY 
;IF EQ END OF LIST 
; COMPARE HIGH ORDER TIMES 
;IF HI NOT THIS ENTRY 
;IF LO ENTRY GOES HERE 
.-COMPARE LOW ORDER TIMES 
IF HIS NOT THIS ENTRY 
BACK UP TO FRONT OF BLOCK 
SET NEW NEXT IN PREVIOUS ENTRY 
SET NEXT IN NEW ENTRY 



.IF DF LISDRV I M«$MGE 



CMPB #C.SYST,R4 ;A SYSTEM ROUTINE REQUEST (DRIVER)? 
tNE 30S ;IF NE NO 

KISAR5,C.AR5(RO) ;SAVE APRS MAPPING 



soil 



.ENDC 



RETURN 



**-»CLRMV-CLOCK QUEUE REMOVAL 

THIS ROUTINE IS CALLED TO REMOVE ALL ENTRIES FOR A SPECIFIED TCB ADDRESS 
AND REQUEST TYPE FROM Tf<E CLOCK QUEUE. 



INPUTS: 



R4»REQUEST TYPE. 

R5«ADDRESS OF REQUESTING TCB OR SYSTEM SUBROUTINE. 



OUTPUTS: 



ALL ENTRIES FOR THE SPECIFIED TCB ADDRESS *ND REQUEST TYPE ARE 
REMOVED FROM THE CLOCK QUEUE. IF THE REQUEST TYPE IS NOT •C.SYST', 
THEN THE CLOCK QUEUE ENTRY CORE BLOCK IS RELEASED. 



OOOOOOG 



000002 
000004 



000006 000002 



tCLRMV::MOV 
401) NOV 
NOV 
!Q 



#ICLKHD.'^0 

R0.R3 

(R5).R0 

301 

R4.C.RQT(R0) 

40i 

R5.C.TCB<R0) 

40i 

(R0),(R3) 



POINT TO CLOCK QUEUE LIST HEAD 

SAVE ADDRESS OF PREVIOUS ENTRY 

GET ADDRESS Of NEXT ENTRY 

IF IQ END Of LIST 

REQUEST TYPE MA1CH7 

IF NE NO 

TCB OR SYSTEM SUBROUTINE ADDRESS i^WTCH? 

li NE NO 

Rt«OVE ENTRY FROM LIST 



«C.$YST,C.RQ1<R0^ .SYSTEM SUBROUTINE REQUEST? 



•••t 



rr 



*••« 



Mirlin Mil no 1i..Mr.77 9A.n« DAAt 9.9 



QUEUE MACRO Ml 108 1A-0EC-77 20:05 PAGE 2-? 



115 
116 
117 
118 
119 
120 
121 
122 
123 
12A 
125 
126 
127 
128 
129 
130 
131 
132 
133 
134 

;u 

137 
138 
139 
HO 
U1 
1A2 



0001 2A 001762 
000126 
000132 000755 



000134 016002 000002 
OOOUO 000A12 



0O0U2 010QQS 

0OOU4 010302 

)U6 011203 

)150 QQUOC 

)152 126163 000002 000002 

)160 101771 

}162 

}164 

166 010160 000002 




BEQ 


40S 


:IF EQ YES CONTINUE 


CALL 


SDECLK 


.-DEALLOCATE ENTRY CORE BLOCK 


BR 


SCLRMV 


;G0 AGAIN 


.DSABL 


LSB 





**-SQINSF-QUEUE INSERTION AT END OF LIST (FIFO) 

THIS ROUTINE IS CALLED TO MAKE AN ENTRY IN A FIRST IN FIRST OUT 
LIST. THE ENTRY IS LINKED TO THE END OF THE LIST. 

INPUTS: 

RO^ADDRESS OF THE TWO WORD LISTHEAD. 
R1 -ADDRESS OF THE ENTRY TO BE INSERTED. 

OUTPUTS: 

THE ENTRY IS LINKED TO THE END OF THE QUEUE. 

RO AND R1 ARE PRESERVED ACROSS CALL. 



.ENABL 
SQINSF : :MOV 
BR 



LSB 

2(R0),R2 

20$ 



;GET ADDRESS OF LAST ENTRY IN LIST 
; FINISH IN COMMON CODE 



**-$QINSP-QUEUE INSERTION BY PRIORITY 

THIS ROUTINE IS CALLED TO INSERT AN ENTRY IN A PRIORITY ORDERED 
LIST. THE LIST IS SEARCHED UNTIL AN ENTRY IS FOUND THAT HAS A 
LOWER PRIORITY OR THE END OF THE LIST IS REACHED. THE NEW 
ENTRY IS THEN LINKED INTO THE LIST AT THE APPROPRIATE POINT. 



INPUTS: 



RO«ADDRESS OF THE TWO WORD LISTHEAD. 
R1 -ADDRESS OF THE ENTRY TO BE INSERTED. 



OUTPUTS: 



tOINSP: 
10$: 



THE ENTRY IS LINKED INTO THE LIST BY PRIORITY. 
RO AND R1 ARE PRESERVED ACROSS CALL. 



20$: 



:MOV 
MOV 
MOV 
BEQ 
CMPB 
BLOS 
MOV 
BR 
MOV 



R0.R3 
R3.R2 
(R2).R3 
20$ 

T.PRKRD.T.PRI 
10$ 

9Ji'"" 

R1.2(R0) 



.•COPY ADDRESS OF LISTHEAD 
.-SAVE ADDRESS OF CURRENT ENTRY 
.GET ADDRESS OF NEXT ENTRY 
;IF EQ END OF LIST 
(R3) ;NEW ENTRY LOWER OR SAME PRIORITY? 

IF LOS YES 

LINK CURRENT fO NEW ENTRY 

SET ADDRESS OF NEW LAST 



•*^» D S **** 



MAi-BA MIIA* 11.-ftcr.77 3A.nt OAftr imX 



QUEUE MACRO Ml 108 U-OEC-77 20:05 PAGE 2-3 



172 000172 005011 
73 00017A 010112 
17A 000176 



192 000200 

193 00020A 
194 



215 000210 

216 000212 

217 0002U 

218 000216 

219 000220 



016700 OOOOOOG 



010002 
011205 
001013 
000261 



30S: 



CLR (R1) 

MOV R1,(R2) 
RETURN 

.DSABL LS8 



CLEAR LINK TO NEXT ENTRY 
LINK NEW TO PREVIOUS ENTRY 



*»-SQMCRLH)UEUE MCR COMMAND LINE 

THIS ROUTINE IS CALLED TO QUEUE A COMMAND LINE FOR MCR. 

INPUTS: 

RUADDRESS OF THE COMMAND LINE CONTROL BLOCK. 

OUTPUTS: 

THE COMMAND LINE CONTROL BLOCK IS INSERTED INTO THE MCR COMMAND 
LINE LIST AND MCR IS REQUESTED TO RUN. 



SQMCRL::MOV IMCRPT.RO ;PICK UP M( ". TCB ADDRESS 
CALLR SEXRQF ;PASS LINE TO MCR 



••-SQRMVF -QUEUE REMOVAL FROM FRONT OF LIST 

THIS ROUTINE 15 CALLED TO REMOVE THE NEXT (FRONT) ENTRY FROM A 
LIST. THE LIST ORGANIZATION NAY BE EITHER FIFO OR BY PRIORITY. 

INPUTS: 

RO>ADDRESS OF iHE TWO WORD LISTHEAD. 

OUTPUTS: 

C*1 IF THERE ARE NO ENTRIES IN THE LIST. 
C»0 IF THE NEXT ENTRY IS REMOVED FROM THE LIST. 
R1=ADDRESS OF THE ENTRY REMOVED. 

RO IS PRESERVED ACROSS CALL, 



.ENABL 
$QRMVF::MOV 

MOV 

BNE 
lOt: SEC 

RETURN 



LS8 
R0.R2 
(R2).R3 
30S 



;COPY ADDRESS OF LISTHEAD 
;GET ADDRESS OF NEXT ENTRY 
;If NE LIST HAS AN ENtRY 
;N0 ENTRIES IN LIST 



•*-SQRMVT-QUEUE REMOVAL BY TCB ADDRESS 

1HIS ROUTINE IS CALLED TO REMOVE THE NEXT ENTRY FROM A LISt fHAT 
MATCHES A SPECIFIED TCB ADDRESS. THE LIST ORGANIZATION MAY BE 
EITHER FIFO OR BY PRIORITY. 

INPUTS: 



•••• { S **M 



QiiriiF MAfRn MHOR U-DEC-77 20:05 PAGE 2-A 



QUEUE MACRO M1108 U-OEC-77 20:05 PAGE 2-A 



g 



2A1 

242 000222 
2A3 00022A 
2A4 000'>26 
2A5 000230 
2A6 000232 
2A7 00023A 

248 000236 

249 000242 

250 000244 

251 000246 

252 000250 

253 000254 

254 000256 

255 OU0260 
256 



81 



010003 

010302 

011203 

001772 

020103 

001403 

020163 000004 

001370 

011312 

001002 

010260 000002 

010301 

000241 



000001 



RO-ADDRESS OF THE TWO WORD LISTEAD. 
RI^ADDRESS OF THE TCB TO SEARCH FOR. 



OUTPUTS: 



C=1 IF THERE IS NO ENTRY IN THE LIST THAT MATCHES THE TCB ADDRESS. 
C^O IF A MATCHING ENTRY IS REMOVED FROM THE LIST. 
RUADDRESS OF THE ENTRY REMOVED. 

RO IS PRESERVED ACROSS CALL. 



SQRMVT::MOV 
20S: MOV 



30$: 



40$: 



MOV 

BEQ 

CMP 

BEQ 

CMP 

BNE 

MOV 

BNE 

MOV 

MOV 

CLC 

RETURN 

.DSABL 

.END 



R0,R3 

R3.R2 

(R2).R3 

101 

R1,R3 

30S 

R1,C.TC8(R3) 

20S 

(R3),(R2) 

40S 

R2,2(R0) 

R3.R1 



LSa 



COPY ADDRESS OF LISTHEAD 

SAVE ADDRESS OF CURRENT ENTRY 

GET ADDRESS OF NEXT ENTRY 

IF EQ END OF LIST 

MATCH ON TCB ADDRESS? 

IF EQ YES 

MATCHING TCB ADDRESS? 

IF NE NO 

CLOSE UP LIST 

IF NE NO NEW LAST 

SET ADDRESS OF NEW LAST 

SET ADDRESS OF ENTRY REMOVED 

SUCCESS 



; 



••** t 3 •••• 



OUfUE MACRO M1108 U-DEC-77 20:05 PAGF 2-5 



QUEUE MACRO MHOS 
SYMBOL TABLE 



C»SORE= 

CARS 

CAST 

C.CSTP= 

COST 

C.EFN 

C.LGTHs 

C.LNK 

C.MRKT= 

C.RQT 

C.RSI 

C.SCHOs 

C.SRC 

C.SSHT= 

C.SUB 

C.SYST= 

C.SYTKs 

C.TCB 

C.TIM 

C.UIC 

HtSftTZ^ 

K»SCNT« 

KSSCSRx 

. ABS. 



OOOAOO 
OOOOU 
000012 
000012 
000016 
000003 
000020 
000000 
000000 
000002 
000012 
000002 
OOOOU 
000004 
000012 
000006 
000010 
OOOOOA 
000006 
000016 
000074 
1775A6 
177546 



-DEC-77 20:05 PAGE 2-5 














KSSIEN- 


000115 


TS.RUN= 


004000 


T.SRCT 


000063 


T3.MCR= 


004000 


KS$LDC= 


000001 


T$SA11= 


000001 


T.STAT 


000032 


T3.NET= 


000020 


IC»$TPS= 


000074 


TI$C11= 


000001 


T.ST? 


0C0034 


T3.NSD= 


000200 


Mt$CRB= 


000124 


T$$J16= 


000001 


T.ST3 


000036 


T3.PM0= 


040000 


RttF11= 


000001 


TS$KMG= 


000000 


T.TCBL 


000030 


T3.PRV= 


010000 


R$$JP0= 


000000 


TH«11 = 


000001 


T.UCB 


000026 


T3.REM= 


020000 


R$$JP1= 


000001 


T.ACTL 


000052 


T2.AB0= 


000100 


T3.WV= 


000040 


RSSJS1> 


000001 


T.ASTL 


000016 


T2.AST= 


100000 


T3.RST= 


000400 


RSSKII:: 


000001 


T.ATT 


000054 


T2.BFX= 


004000 


T3.SLV= 


002000 


R$$P11= 


000001 


T.CPCB 


000004 


T2.CAF= 


000400 


VS$CTR= 


000400 


RSSX11- 


000001 


T.DPRI 


000040 


T2.CHK= 


020000 


$ABTIM< 


*♦•**♦ 6X 


R$$11H« 


000000 


T.EMG 


000022 


T2.CKD= 


010000 


SCLINS 


OOOOOORG 


R»»11S» 


000000 


T.IOC 


000003 


T2.0ST= 


040000 


SCLKHDc 


••♦*♦* GX 


S$»ECC» 


000000 


T.LBN 


000041 


T2.FXD» 


002000 


SCLRMV 


000066RG 


S»»YSZ= 


001000 


T.LOV 


000044 


T2.HLTS 


000200 


SDECLKc 


♦•**•* GX 


TS.BLKs 


170700 


T.LNIC 


000000 


T2.SPN" 


000004 


SEXRQF= 


**•••* GX 


TS.CKP= 


000200 


T.MXSZ 


000050 


T2.STP= 


000020 


$MCRPT= 


*•♦•*♦ GX 


TS.CICR« 


000100 


T.NAM 


000006 


T2.TI0» 


001000 


SQINSF 


0001 34RG 


TS.EXEs 


100000 


T.OFF 


000060 


T2.WFR" 


000001 


$QINSP 


0001 42RG 


TS.MSG= 


020000 


T.PCB 


000046 


T3.ACP= 


100000 


SQMCRL 


000200RG 


TS.NRP= 


010000 


T.PRI 


000002 


T3.CAL= 


000100 


SQRMVF 


00021 ORG 


TS.OUTs 


000400 


T.RCVL 


000012 


T5.CLI- 


001000 


$QRMVT 


000222R6 


TS RDN» 


040000 


T.RRFL 


000064 











000070 000 

000262 001 

ERRORS DETECTED: 

VIRTUAL MEMORY USED: 2544 WORDS ( 10 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:13 

C41.20]QUEUE.SYO:C41.30]QUEUE/-SP=C1.nEXEMC/ML,C41.10]RSXMC,C11.10]QUEUE 
Yq M 



••*• 6 5 **** 



1 




•••• H 3 **** 



WQSB owe RO Nil 08 U-OfC-77 ?0:0? PAGE 2 



REQSB MACRO Ml 108 U-DEC-77 20:05 PAGE 2 



»4 



.TITLE REQSB 
.IDENT /09/ 



COPYRIGHT (C) 1974, 1978 

DIGITAL EQUIPMENT CORPORATION. MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERNS OF SUCH LICENSE. 

VERSION 09 

D. N. CUTLER 10-AU6-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
T. J. MILLER 

MODIFIED BY: 

T, J. MILLER 7-DEC-76 

TM068 — CHECK fOR TASK EXITTIN6 IN TEST FOR 
CHECKPOINT. 

T. J. MILLER 26-MAV-77 

TM086 — ADDITION OF COMMON EVENT FLAG SETTING ROUTINE. 

P. WANNHEDEN 8-JUN-77 

PW001 — ADDITION or ROUTINE TO QUEUE AST FROM 
USER INTERRUPT SERVICE ROUTINE 
(INTERRUPT VIA VECTOR CONNECTED TO WITH 
CINTI DIRECTIVE). 

T. J. MILLER 17-SEP-77 

TM106 — CORRECT ERROR IN CONDITIONALIZATION. 
T. J. MILLER 31-SEP-77 

TM101 — MODIFY SSETCR FOR ELIMINATION OF NULL TASK. 

T. J. MILLER 8-DEC-77 

TMIIS -- CORRECT ERROR IN CONDITIONALIZATION IN SYSTEMS 
WITH SYSTEM CONTROLLED PARTITIONS BUT NO 
CHECKPOINTING. 

TASK REQUEST RELATED SUBROUTINES 

MACRO LIBRARY CALLS 



.MCALL HDRDFS.ITBDFt.PCBDFt.TCBDFS 



; PW001 



IKQ» MACRO Mil 08 U-OFC-T? 20:05 PAGF 2-1 



REQSB MACRO Ml 108 U-OEC-77 20:05 PAGE 2-1 



58 000000 HDRDFS 

59 000000 ITBDf$ 

60 000000 PCBDFS 

61 000000 TCBOFS 
62 



DEFINE TASK HEADER OFFSETS ;**-1 

DEFINE INTERRUPT TRANSFER BLOCK OFFSETS; PW001 
DEFINE PARTITION CONTROL BLOCK OFFSETS 
DEFINE TASK CONTROL BLOCK OFFSETS 



•♦-SAflCTK-AflORT CURRENT TASK 
••-SABTSK-ABORT TASK 

THIS ROUTINE IS CALLED TO NARK A TASK FOR ABORT AND TO FORCE A TASK EXIT. 
THE REASON FOR ABORT AND THE CURRENT OUTSTANDING I/O COUNT ARE S10RED 
IN THE FIRST TASK EVENT FLAG WORD. 



INPUTS: 



rO'Reason for abort. 

r1-address of the tcb of the task to be aborted (entry at sabtsk (jnly>. 



OUTPUTS: 

; THE TASK IS MARKED FOR ABORT AND A CONDITIONAL SCHEDULE REQUEST IS 
; SET. 



82 000000 

83 000004 

84 000010 

85 000016 

86 000020 

87 000024 

88 000030 

89 000034 

90 000040 

91 000042 

92 000044 

93 000050 



016701 OOOOOOG 

010061 000022 

116161 000003 000023 

010100 

062701 000032 

042721 000100 

042711 000025 

052711 140300 

005741 

001002 

016000 000046 



SABCTK::nOV 
SABTSK: :MOV 
MOVB 
MOV 
ADD 
BIC 
BK 
BIS 
TST 
BNE 
CALL 
MOV 



tTKTCB.RI ;SET TCB ADDRESS TO CURRENT TASK 
RO.T.EFLG(RI) ; INSERT REASON FOR ABORT 
r.lOC(Rl).T.EFLC»1(R1) .SAVE OUTSTANDING I/O COUNT 
RI.RO .COPY TCB ADDRESS 
«T.STAT.R1 .-POINT TO FIRST TASK STATUS WORD 
«TS.CKR.(R1)t :CLEAR STATUS BITS 

*T2.STP!T2.SPN!T2.WFR.(R1) ;MAKE SURE TASK IS RUNNABLE 
#T2.AST!T2.D?T1T2.HLT!T2.AB0.(R1) .-DSBL AST'S t FRC EXIT 



101: 



-(R1) 

10$ 

9SETCR 

T.PCB(R0).RO 



OUT FOR INITIAL LOAD OR OTHERWISE BLKD? 
IF NE YES 

SET A CONDITIONAL SCHEDULE REQUEST 
POINT TO TASK PCB 



.-REALLOCATE TASK PARTITION IF NECESSARY 



01 

02 000054 

03 



.IF DF DttlSK 

CALLR SNXTSK 

.IFF 

RETURN 

.CNDC 



**-IBILDS-BUILD STACK AND INITIALIZE HEADER 

IHIS ROUTINE SETS UP THE TASK STACK AND INITIALISES THE HEADER. It IS 
CALLED PRIOR TO PLACING A TASK INTO CONTENTION FOR THE PROCESSOR W»4EN 
AN EXECUTION REQUEST IS MADE FOR A TASK THAT IS FIXED IN MEMORY OR 
WHEN A DISK RESIDENT TASK HAS FINISHED LOADING. 



••** 



TT 



*•** 



MQtB uktttn MiinR u-brr-77 P0:0^ pagf 2'1 



REQSB MACRO MHOS U-OEC-77 20:05 PAGE 2-2 



115 
116 
117 
118 
119 
120 
121 
122 
123 
124 
125 
126 
127 
128 

129 000056 

130 000062 

131 000066 

132 000074. 

133 000076 
134 

135 

136 

137 

138 

139 

UO 

U1 

U2 00010A 

U3 

U4 

U5 

U6 

M>7 

U8 

U9 

150 

151 000104 

152 000112 

153 0001U 
'54 000120 

55 000126 
'56 000130 
157 000134 



INPUTS: 



RO=ADDRESS OF THE TCB OF THE TASK TO INITIALIZE. 



OUTPUTS: 



016001 
016101 
016061 
001003 
016161 



000046 
OOOOOOG 
000022 000010 

000012 000010 



l-TASK LOCAL EVENT FLAGS 1.-32. ARE CLEARED. 

2-CURRENT UIC IS SETUP IN THE HEADER. 

3-TASK CONTEXT IS SETUP TO CAUSE THE TASK TO START EXECUTION AT ITS ENTR 

4-REDISPATCHING OF THE PROCESSOR IS CONDITIONALLY REQUESTED. 

R3 IS PRESERVED ACROSS CALL. 

SBILDS::nOV T.PCB(R0).R1 .GET ADDRESS OF TASK PCB 

NOV P.HDR(R1),R1 ;P01Ni TO TASK HEADER 

MOV T.EFLG(R0).H.CUIC(R1) ;SET SPECIFIED UIC 

BNE 10$ :IF NE UIC WAS SPECIFIED 

MOV H.DUIC(R1).H.CU1C(R1) ;SET DEFAULT UIC 



.IF DF MSSMUP 
M 15S 
.IFTF 

.IFT 



10S: 



032760 
001010 
005060 
032760 
001002 
005060 



000100 000034 15$: 

000022 

100000 000036 



000024 



20t: 



5? Wa, 811121 ?m?2 



;REF LABEL 



MOV T.ACTL(R0),H.DUIC(R1) ;SET DEFAULT UIC 
.ENDC 



BIT 
BNE 

CLR 
BIT 
BNE 

CLR 



#T2.A80,T.ST2(R0) :TASK MARKED FOR ABORT? 
20S ;1F NE YES 

T.EFLG(RO) :CLEAR TASK LOCAL EVENT FLAGS 
»T3.ACP.T.ST3(R0) .TASK ACP? 



20S 
T.EFLG*2(R0) 



.IF DF MSIMGE 



MOV 
MOV 
SUB 
MOV 
MOV 

.IFF 



H.lSP(Rn,(R1) 

H.CARD(R1).R2 

#16,R2 

H.IPC(R1).(R2) 

H.IPS(R1).-(R2) 



IF NE YES 
REF LABEL 



SET INITIAL STACK POINTER 
POINT TO CONTEXT SAVE AREA 
POINT TO SAVED PC 
SET INITIAL PC WORD 
SET INITIAL PS WORD 



H.ISP(R1).R2 ;GET INITIAL STACK POINTER 
H.1PS(R1).-(K2) .-SET INITIAL PS WORD 



•••• K S **** 



R(QM MACRO M110R 14-DEC-77 20:05 PAGF 2-S 



REQSB MACRO M1108 U-OEC-77 20:05 PAGE 2-3 



172 000U4 

175 000150 

17A 000152 

175 

176 

177 

178 

179 

180 

181 

182 

183 

184 

185 

186 

187 

188 

189 

190 

191 

192 

193 

19A 

195 

196 000154 

197 000160 

198 000162 

199 000166 

200 000174 

201 000176 

202 000202 
203 

204 
205 
206 
207 
208 
209 
210 
211 
212 
213 
214 
215 
216 
217 



016V.2 000016 

024242 

010211 



MOV H.IPC(R1).-(R2) ;SET INITIAL PC WORD 

CMP -(R2),-(R2) .-ADJUST TO BOTTOM OF STACK 

MOV R2,(R1) ;SET INITIAL STACK POINTER 

.ENOC 



; ♦*-SACTTK-PUT TASK IN ACTIVE TASK LIST 

; THIS ROUTINE IS CALLED TO PUT AN A' VE TASK IN THE ACTIVE TASK LIST. 

; INPUTS: 

; RO»ADDRESS OF THE TCB OF THE TASK TO PUT IN THE ACTIVE LIST. 

; OUTPUTS: 



012701 1777266 

010102 

016201 000052 

126160 000002 000002 

103371 

010062 000052 

010160 000052 



I 
t 
t 
t 
I- 

»ACTTK: 
10$: 



THE SPECIFIED TASK IS MERGED INTO THE ACTIVE TASK LIST BV 
PRIORITy. 

R3 IS PRESERVED ACROSS CALL. 



:M0V ffACTHD-T.ACTL.R1 ;SET ADDRESS OF PREVIOUS TCB 

MOV R1,R2 .SAVE ADDRESS OF PREVIOUS TCB 

MOV T.ACTL(R2),R1 ;GET ADDRESS 0? NEXT TCB 

CMPB T.PRKRD.T.PRKRO) .-TASK HIGHER OR SAME PRIORITY? 

BHIS 10S 'IF HIS YES 

MOV R0.T.ACTL(R2) ;LINK NEW TASK TO PREVIOUS 

MOV RI.T.ACTL(RO) SET LINK TO NEXT IN NEW TASK 



**-SSETCR-SET CONDITIONAL SCHEDULE REQUEST 

**-$SETRQ-SET SCHEDULE REQUEST 

••-ISETRT-SET SCHEDULE REQUEST FOR CURRENT TASK 

THIS ROUTINE IS CALLED TO FORCE REDISPATCHING OF THE PROCESSOR 
FROM A SPECIFIED POSITION IN THE TASK LIST. IF A PREVIOUS REQUEST 
HAS BEEN SET, THEN REDISPATCHING STARTS AT WHICH EVER REQUEST 
HA- THE HIGHEST PRIORITY. 



INPUTS: 



IF ENTRY AT SSETRT. THEN 

R5«ADDRESS OF THE TCB OF THE CURRENT TASK. 
IF ENTRY AT tSETRQ OR ISETCR, THEN 

RO'ADDRESS OF THE TCB TO START DISPATCHING AT. 



OUTPUTS: 



A SCHEDULE REQUEST IS <cT WHICH WILL FORCE A REDISPATCH- 
ING OF THE PROCESSOR WHEN A SYSTEM EXIT IS EXECUTED. 

R2 AND RS ARE PRESERVED ACROSS CALL. 

RO IS PRESERVED ACROSS CALL IF ENTRY IS NOT AT tSETRT. 



•••• I 3 ••«• 



I »a%A HArAD M110R U-DFC-77 P0:05 PAGE 2-4 



1 



REQSB MACRO Ml 108 U-DEC-77 20:05 PAGE 2-4 



229 
230 

231 000206 

232 000212 

233 0002U 

234 00U222 

235 00022A 

236 000226 

237 000232 

238 000234 

239 000240 

240 000242 

241 000244 

242 000246 

243 000254 

244 000256 

245 000260 

246 000264 
247 

248 
249 
250 
251 
252 
253 
254 
255 
256 
257 
258 
259 
260 
261 
262 
263 
264 
265 
266 

267 000266 

268 000272 

269 000300 

270 000302 

271 000304 
271 000306 

273 000310 

274 000314 

275 000316 

276 000322 

?79 



020067 OOOOOOG 

001410 

126760 OOOOOOG 000002 

101020 

103403 

010500 

016701 OOOOOOG 

001407 

020001 

001407 

126160 000002 000002 

101003 

001763 

010067 OOOOOOG 



032765 000100 000034 

001001 

050011 

010500 

005301 

020127 000002G 

105403 

005767 OOOOOOG 

001731 



.ENABL 
$SETCR::CMP 
BEQ 
CMPB 
BHI 
BLO 
10$: CALLR 
$SETRT::«0V 
SSETRQ::nOV 
BEQ 
CNP 
BEQ 
CMPB 
BHI 
BEQ 
20$: MOV 
30$: RETURN 
.DSABL 



LSB 

R0,$TKTCB 

$SETRQ 

$CURPR.T.PR 

30$ 

$SETRQ 

$DRDSE 

R5,R0 

$RQSCH,R1 

20$ 

RO.RI 

30$ 

T.PRKRD.T 

30$ 

10$ 

R0,$RQSCH 

LSB 



.•REQUESTED TASK SAME AS CURRENT? ; TM101 
;IF EQ YES •♦•-p 

KRO) .-CURRENT TASK HIGHER PRIORITY? ; TM101 
;1F HI YES t.-l 

;1F LO NO 

.'SAME PRIORITY-DECLARE SIGNIFICANT EVENT 
.SET ADDRESS OF DISPATCH TC8 
;GET PREVIOUS SCHEDULE REQUEST 
:IF EQ NO PREVIOUS REQUEST 

.■TASK ALREADY RESCHEDULED? ; TM086 

.1' EQ YES TM086 

PRKRO) ;C0MPARE PRIORITIES 

;IF HI PREVIOUS IS HIGHER PRIORITY 
;1F EQ SAME PRIORITY 
.-r.ET SCHEDULE REQUEST 



**-$SETF/$SETM-SET tVENT FLAG 

THESE ROUTINES SET AN EVENT FLAG AND TAKE CARE OF THE REQUIRED 
RESCHEDULING. 



INPUTS: 



RO«EWENT FLAG NUMBER ($SETF) OR EVENT FLAG MASK ($SETM) 
R1«EVENT FLAG WORD ADDRESS ($SETM ONLO. 
R5-TCB ADDRESS FOR WHICH FLAG IS BEING SET. 



OUTPUTS: 



$SETF: 
$SETM: 



10$: 



20ti 



RO«TCB ADDRESS OF TASK WHOSE FLAG WAS SET 
R3 IS PRESERVED. 



CALL 

BIT 

BNE 

BIS 

MOV 

DEC 

CMP 

BLO 

TST 

GEO 

CALLR 

RETURN 



$CEFI ; CONVERT EVENT FLAG TO MASK AND ADDRESS 

fT2.ABO.T.ST2(R5) ;IS TASK MARKED FOR ABORT? 



10$ 

RO.(RI) 

R5.R0 

R1 

R1.#$C0MEF»2 

20i 

$SIGFL 

$SETCR 

$DRDSE 



;IF m YES. DO NOT TOUCH EVENT HAG WORD 

;SET THE EVENT FLAG 

.-COPY TCB ADDRESS FOR $SETCR 

;WRAP AROUND ON TO -1 

;IS IT A COMMON EVENT FLAG? 

;IF LO YES 

;IS SOME TASK WAITING FOR A SIG (VENT? 

.IF EQ NO, SET SCHEDULE REQUEST 

.'DECLARE SIGNIFICANT EVENT AND RETURN 



••-$DASTT-DECLARE AST TRAP 



TH S ROUTINE IS CALLED TO DECLARE A NON-I/O RELATED AST IRAP. THf 
1i^^^ SLil^L^^IU^if^ ^*SK IS EXAMINED TO DETERMINE If THE SPECIFIED 
AST IS ENABLED (SETUP). IF II IS THEN THE AST IS DECIARED. 



TM086 
TM086 
TM086 
rM086 
TM086 
TM086 
1M086 
TM086 
TM086 
TM086 
TM086 
TM086 
TM0e6 
TM086 
TM086 
TMOM 
TM086 
TM086 
TM086 
TM086 
TM0B6 
TM0i6 
TM086 
TM086 

^!^ 
TMOM 

TM086 
TMpi6 
TM086 
TM086 



*••• M S »«t* 



1 



l>»QM MACRO M1108 U-Orr-^7 ?0:05 PAGf 2-5 



REQSB MACRO Ml 108 U-DEC-77 20:05 PAGE 2-5 



286 
287 
288 
289 
290 
291 
292 
293 
294 
295 
2% 
297 
298 
299 
300 
301 
302 
303 
30A 
305 
306 
307 
308 
309 
310 
311 
312 
313 
3U 
315 
316 
317 
318 
319 
320 
321 
322 
323 
324 
325 
326 
327 
328 
329 
330 
331 
332 
333 
$34 
55 



INPUTS: 



RA=0FFSET INTO THE TASK HEADER TO THE AST CONTROL BLOCK ADDRESS. 
R5=ADDRESS OF THE TCB OF THE TASK TO DECLARE THE AST FOR. 



OUTPUTS: 



C«1 IF THE TASK IS NOT SETUP FOR THE SPECIFIED AST. 
C=0 IF THE TASK IS SETUP FOR THE AST AND THE AST HAS BEEN DECLARED. 
R1=ADDRESS OF THE AST CONTROL BLOCK. 

NOTE: RA IS DESTROYED BY THIS ROUTINE 



.IF DF ASSTRP!c$$LPP!Pt$RFL!RSSSND!P$SSRF 



;GET ADDRESS OF TASK PCS 
.•CALCULATE ADDRESS OF A3T CONTROL BLOCK 
jASSLWE AST CANNOT BE DECLARED 
#TS.CKP!TS.EXE!TS.0UT,T.STAT(R5) .-ACTIVE AND RESIDENT? 
;IF NE NO 
;COPY TCB ADDRESS 

;P1CK UP ADDRESS OF AST CONTROL BLOCK 
:!r EO THERE IS NONE 
.'ELSE INDICATE CONTROL BLOCK IS IN USE 





.ENABL 


LS8 


$DASTT: 


:MOV 




T.PCr .).R0 




ADD 




P.HDI J.R4 




SEC 








BIT 




#TS.CKP!TS.E 




BNE 




10$ 




MOV 




R5,R0 




MOV 




(R4>.R1 




BEO 




101 




CLR 




(R4) 




.IF 

M 


DF 


CISINT 
SQASTT 



;G0 QUEUE THE AST 



**-SDQAC-DEOUEUE AST BLOCK QUEUED BY tOASTC. 
(TO BE CALLED FROM SYSXT ONLY). 



INPUT: 



RO 



POINTER TO AST BLOCK 



OUTPUT: 

A.CBL SET TO 1 TO INDICATE AST BLOCK FREE 
(NOT IN AST QUEUE). 

REGISTERS ALTERED: NONE 



SDUAC:: INC A.CBL(RO> 

RETURN 



; SET AST BlOCK FREE 



•• -MAS :C -QUEUE AST TO TASK. 

THIS IS A VARh <r OF tOASTT TU Bt USED BY A TASK ISR, ENTERED 
VIA A VECTOR CONNECTED TO VIA THE f JNTI DIRECTIVE. 



•••tlii s **•* 



PW001 
PW001 
PW001 
PW001 
PW001 

PW001 

PW001 
PW001 

PU001 
PW001 

PW001 
PW001 
PW001 
PW001 
PWOOl 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 

PWOOI 
PW001 
PWOOI 

PWOOI 



REQSB MACRO Ml 108 U-OEC-77 20:05 PAGE 2-6 



3A3 
3AA 
3A5 
3A6 
W7 
V.8 
3A9 
350 
351 
352 
353 
354 
355 
356 
357 
358 
r59 
360 
361 
362 
363 
364 
365 
366 
367 
368 
369 
370 
371 
372 
373 
374 
375 
376 
377 
378 
379 
380 
3S1 
382 
383 
384 
385 
386 
387 
388 
389 
390 
391 

393 
394 
595 



INPUT: 
OUTPUT: 



POINTER TO FORK BLOCK IN ITB 



CC-C IF OK. 1 IF AST ADDRESS NOT SPECIFIED IN CINTS CALL. 

NOTE - IF THE AST BLOCK IS ii><.READY QUEUED FOR THE TASK, 
NO ACTION IS TAKEN. RETURN CC-C • 0. 

REGISTERS ALTERED: R0.R1.R2.R3 



tQASTC::M0V 
ADD 
TJ 



R5.R1 

«X.AST-X.F0RK.R1 : iET AST BLOCK 



A.CBL(RI) 

lot 

A.AST(RI) 

10$ 

A.CBL(RI) 

X.TCB-X.F0RK(R5) 



AST BLOCK ALREADY IN AST QUEUE? 

Y - EXIT WITH CC-C » 

AST ADDRESS SPECIFIED? 

ASSUME NO 

N - EXIT yiTH CC-C « 1 

INDICATE AST BLOCK IN USE 

RO ;6ET TCB ADDRESS 

FALL THRU TO IQASTT 



.ENDC 



PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PU001 
PW001 
PW001 
PW001 

pyooi 

PW001 
PW001 
PW001 



••-IQASTT-QUEUE AST TO TASK 

THIS ROUTINE IS USED TO QUEUE AN AST TO A TASK AND INSURE THE TASK 
WILL BE SCHEDULED AND RECONSIDERED FOR ELIGIBILITY IN THE PARTITION. 

INPUTS: 



I RO«TCB ADDRESS OF TASK TO RECEIVE AST 

; RI'ADDRESS OF AST CONTROL BLOCK TO BE USED 



OUTPUTS: 



I 



C>0 

R1 IS PRESERVED 



tQASrT::ADD 
NOV 
CALL 
SUB 
CALL 



fT.ASTL.RO 

R1,-(SP) 

tOlNSF 

fT.ASTL.RO 

ISETCR 



.■POINT TO TASK AST LISTHEAD 

:SAVE ADDRESS OF AST CONTROL BLOCK 

; INSERT CONTROL BLOCK IN AST QUEUE 

;POINT BACK TO TCB ADDRESS 

;SEf A roNDITIONAL SCHEDaE REQUEST 



.IF DF DttlSKICStCKP 



i 



#I2.STP.T.ST2(R0) :l$ TASK STOPPED? 
^« ill EO W 

.PCB(RO).RO .POINT TO TASK PCB 



•••• I 4 tt«« 



rz. 



■*Atf>&M BAttAft 



« J^-K*^-99 ^A.Aft AAAS ).9 



REQSB MACRO Ml 108 U-DEC-77 20:05 PAGE 2-7 



400 
A01 
A02 
403 
404 
405 
406 
407 
408 
409 
410 
411 
412 
413 
414 
415 
416 
417 
418 
419 
420 
421 
422 
423 
424 
425 
426 
427 
428 
429 
430 
431 
432 

433 000332 

434 000336 

435 000342 

436 000344 

437 000352 

438 000354 

439 000360 
t^O 000364 

441 000366 

442 000370 
443 

444 
445 
446 
447 
448 
449 
450 
451 
452 
453 
454 
455 
456 



016700 
026013 
001004 
026063 
001406 
016000 
005760 
00r64 
000£41 



OOOOOOG 
000006 

000010 000002 

000030 
000030 





CALL SNXTSK 




.ENDC 


Sit 
IMi 


MOV (SP)».R1 

RETURN 
.DSABL LSB 



; REALLOCATE TASK PARTITION 



RESTORE AST CONTROL BLOCK ADDRESS 
RETURN CARRY CLCAR 



.ENDC 



**-$SRSrD-SEARCH SYSIEM TASK DIRECTORY 

THIS ROUTINE IS CALLED TO f"ARCH THE TASK DIRECTORY FOR A TASK OF THE 
SPECIFIED NAME. 

INPUTS: 

R3>ADDRESS OF THE TASK NAME TO SEARCH FOR. 

OUTPUTS: 



t 
t 
t 
I 
i 



C>1 IF SPECIFIED TASK IS NOT FOUND. 
C>0 IF SPECIFIED TASK IS FOUND. 
RO*AODRESS OF THE TCB. 

R1.R2. AND R3 ARE PRESERVED ACROSS CALL. 



.ENABL 
tSRSTD::MOV 
lot: CW 



LSB 

STSKHD.RO 
T.NAM(R0).(R3> 
20S 



POINT TO FIRST TCB IN LIST 
FIRST HALF OF NAME MATCH? 
IF NE NO 



T.NAM*2(R0).2(R3) ; SECOND HALF OF NAME MATCH? 



m 



301 

T.TCRL(RO).P0 
TJCm.(RO) 
101 



RETURN 



IF EO YES 

GET LINK TO NEXT TCB 

NULL TASK? 

IF NE NO 
; INDICATE FAILURE 
t 



••-fACIRM-RCMOVE TASK FROM THE ACTjVE TASK LIST 

THIS ROUTINE IS CALLED TO REMOVE A TCB FROM THE ACTIVE TASK LIS' 

INPUTS: 

RO'ADDRESS OF THE TCB TO REMOVE. 

OUTPUTS: 

C«1 HF THERE IS NO ENTRY IN IME LIST THAT MATCHES THE TCB AODRES 
C>0 IF A MATCHING ENTRY IS REMOVED FROM THE LIST. 



••t* C 4 **•• 



nz 



MArMft M14>\> ii._rker_T# an.nt B*>1C 3.> 



REQSB MACRO Mil 08 U-DEC-77 20:05 PAGE 2-8 



A57 

A58 

A59 

A60 

461 

A62 000372 

A63 000376 

A6A 000400 

A65 00040A 

466 000406 

467 000410 

468 000412 

469 000420 
470 

471 
472 
473 
474 
475 
476 
477 
478 
479 
480 
481 
482 
483 
484 
485 
486 
487 

488 000422 

489 000426 
490 

491 

492 

493 

A94 

495 

496 

497 

498 

499 

500 000434 

501 

504 
505 
506 
507 
508 
509 
510 
511 

\\i 



012701 
010102 
016201 
001770 
020001 
001372 
016062 



177726G 
000052 

000052 000052 



$ACTRH: 
40$: 



016700 
052760 



OOOOOOG 
000020 000034 



RO IS PRESERVED ACROSS THE CALL. 



:M0V #$ACTHD-T.ACTL,R1 ;6ET ADDR OF LISTHEAD 

MOV R1,R2 ;SAVE PREVIOUS TCB ADDR 

MOV T.ACTL(R^).R1 ;GET NEXT TCB ADDR 

BEC 25S :IF EQ END OF LIST FOUND 

CMP R0.R1 ;0OES NEXT TCB ADDR EQ OURS? 

BNE 40S ;IF NE NO — KEEP LOOKING 

MOV T.ACTL(R0).T.ACTL(R2) ;REM0VE ENTRY 
RETURN .-EXIT 

.DSABL LSB 



••-ISTPCT-STOP CURRENT TASK 
••-$STPTK-ST0P TASK 

THESE ROUTINES ARE CALLED TO STOP A TASK AND REALLOCATE THE TASK'S 
PARTITION. 

INPUTS: 

R0»TCB ADDRESS OF TASK TO STOP (IF ENTRY AT SSTPTK) 
OUTPUTS: 

NONE 



ISTPCT::MOV STKTCB.RO ;PICK UP ADDRESS OF CURRENT TASK TCB 
»STPTK::BIS #T2.STP,T.ST2(R0) ;SET STOP BIT IN TASK'S TCB 



.IF DF DSSISK 



CALL 

MOV 

BR 

CALLR 



tSETCR 
T.PCB(R0>,R0 

SNXTSK 



tSETCR 



INSURE THAT TASK WILL STOP 
POINT TO TASK PCB 
REALLOCATE TASK PARTITION 



.-INSURE THAT TASK WILL STOP 



:*«-4 

: TM106 

; TM106 

; TM106 

: TM106 



TM106 
TM106 
TM106 
TM106 
TM106 
TM106 



••-•RLPAH-Rf LEASE TASK PARTITION 
••-iRLPRI-RELEASf PARTITION 

THIS ROUTINE IS CALLED TO RELEASE A PARTITION OWNED BY A TASK AND TO 
ASSIGN THE PARTITION TO THE NEXT HIGHEST PRIORITY TASK WAITING TO 
OCCUPY THE PARTITION. 

INPUTS! 



ftt*« i 4 •••• 



n: 



MA«>^A M««Aa 



«l._Jk*J>-W nA.At MA^f 9.A 



REQSB MACRO Ml 108 U-OEC-77 20:05 PAGE 2-9 



5U 
515 
516 
517 
518 
519 
520 
521 
522 
523 
52A 
525 
526 
527 
528 
529 
530 
531 
532 
533 
53A 
535 
536 
537 
538 
539 
540 
541 
542 
543 
544 
545 
546 
547 
548 
549 
550 
551 



RO^ADDRESS OF THE TCB OF THE OWNER TASK (IF ENTRY AT SRLPAR) 
RI^ADDR OF SUBPARTITION PCB TO RELEASE (IF ENTRY AT SRLPR1) 
R3=ADDRESS OF MAIN PARTITION PCB (IF ENTRY AT SRLPRI) 



OUTPUTS: 



THE PARTITION IS RELEASED AND ASSKiNED TO THE NEXT HIGHEST 
PRIORITY TASK WAITING TO OCCUPY THE PARTITION. 



SRLPAR:: MOV 
MOV 
MOV 



T.PCB(H0),R1 

P.MAIN(R1),R0 

R0,R3 



GET ADDRESS OF PARTITION PCB 
GET MAIN PCB ADDRESS 
COPY MAIN PCB ADDRESS 



IF DF DSSYNMIffSSMC' 



10$: 



,(R0) .-SYSTEM CONTROLLED PARTITION? 
;IF EQ NO 

;SAVE ADDRESS OF PREVIOUS PCB 
;GET ADDRESS OF NEXT PCB 
;TASK PCB? 
IF NE NO 



BIT /rPS.SYS.P.ST 

BEQ SRLPRI 

MOV R0.R2 

MOV P.SUB(R2>,R0 

CMP R0.R1 

BNE 10S 

MOV P.SUB(R0),P.SUB(R2) .-REMOVE PCB FROM LIST 

.ENDC 



SRLPRI : 



:ADD fP.BUSY.RI .-POINT TO BUSY FLAG 
BICB (R1)*,(R1) ; CLEAR SUBPARTITION BUSY 
BICB -(RD.P.BUSYtKRS) .-CLEAR MAIN PARTITION BUSY 



••-SNXTSK-ASSIGN NEXT TASK TO PARTITION 

THIS ROUTINE IS CALLED TO ASSIGN A PARTITION TO THE HIGHEST PRIORITY 
TASK WAITING TO OCCUPY THE PARTITION. 

INPUTS: 

RO'ADDRESS OF THE PCB OF THE PARTITION TO ASSIGN. 
OUTPUTS: 

THERE ARE FIVE POSSIBLE OUTPUTS 

1-THE PARTITION IS NOT CURRENTLY BUSY AND A TASK IS WAITING TO 
OCCUPY THE PARTITION. THE PARTITION IS ASSIGNED TO THE 
WAITING TASK AND A REQUEST IS PLACED IN THE LOADER 
QUEUE TO LOAD THE TASK. 

2-THE PARTITION IS CURRENTLY OCCUPIED BY A TASK THAT IS EITHER OF 
HIGHER PRIORITY THEN All WAITING TASKS OR IS NOT CHECK- 
POINTABLE. THE PARTITION CANNOT BE ASSIGNED TO ANOTHER 
TASK. 

3-THE PARTITION IS CURRENTLY OCCUPIED BY A LOWER PRIORITY CHECK- 



•••• t 4 •••• 



MQui mkrttn Miinn u-nFr-77 70.0% Pktf P-10 



REQSB MACRO Ml 108 U-OEC-77 20:05 PAGE 2-10 



I 



POINTABLE TASK. A REQUEST IS PLACED IN THE LOADER QUEUE 
TO CHECKPOINT THE OWNER TASK. 

A-THE HIGHEST PRIORITY TASK WAITING TO OCCUPY THE PARTITION 
REQUIRES THE MAIN PARTITION WHICH IS CURRENLTY 
OCCUPPIED BY ONE OF MORE TASKS THAT ARE EITHER OF 
HIGHER PRIORITY OR ARE NOT CHECKPOINTABLE. THE PARTITION 
CANNOT BE ASSIGNED. 

5-THE HIGHEST PRIORITY TASK WAITING TO OCCUPY THE PARTITION 
REQUIRES THE MAIN PARTITION WHICH IS CURRENTLY 
OCCUPIED BY ONE OR MORE TASKS OF LOWER PRIORITY 
THAT ARE CHECKPOINTABLE. A REQUEST IS PLACED IN THE 
LOADER QUEUE TO CHECKPOINT EACH TASK. 



$NXTSK::SAVNR 

MOV 
10»: 
20f: 



MOV 
BEQ 
BIT 



21 S: 



BEQ 
TST 
BEQ 



.IFF 

BNE 

.ENDC 



1 



251: 



BIT 
BNE 

.ENDC 



TSTB 

BMI 

MOV 

TSTB 

BNE 

MOV 

ADD 

MOV 

CALL 

MOV 

MOV 

ADD 



P.MAIN(R0).R5 
P.WA1T(R5),R« 
100S 



SAVE RA AND R5 

GET MAIN PARTITION PCB ADDRESS 

GET 1ST TCB IN WAIT LIST 

IF EQ END OF LIST 



#T2.STP.T.ST2(R«) .-TASK STOPPED? 



.IF DF ASSTRP 



21S 

T.ASTL(R«) 

40$ 



40$ 



IF EQ NO 

DOES TASK HAVE PENDING AST? 

IF EQ NO 

REF LABEL 



;ir NE YES 



.IF DF D$$YNMIM$$MGE 



tPS.SYS,P.STAT(R5) ;SYSTEM CONTROLLED PARTITION? 
110$ :IF NE YES 



P.BUSYn(R5) 

56$ 

T.PCB(R4),R2 

P.BUSY»1(R2) 

36$ 

R5.R0 

fP.WAIT.RO 

R4.R1 

$QRMVT 

T.PCB(R4).R0 

R4.P.TC8(R0) 

fP.flUSY.RO 



MAIN PARTITION OCCUPIED? 

IF Ml YES 

GET REQUESTED PARTITION PCB ADDRESS 

REQUESTED PARTITION BUSY? 

IF NE YES 

COPY MAIN PARTITION PCB ADDRESS 

CALCULATE PCB LISTHEAD ADDRESS 

COPY TCB ADDRESS 

REMOVE TCB FROM LIST 

GET PCB ADDRESS 

PUT TCB ADDRESS IN PCB 

P0IN1 TO BUSY Ft AG 



*•«• f 4 •#•• 



RfQ» MACRO M1108 U-OEC-77 20:05 PAGF 2-11 



REQSB MACRO MIIOB U-OEC-77 20:05 PAGE 2-11 



\ 



i 

I 



661 



loot: 



nos: 



BISB (M)*AM) ; SET SUBPARTITION BUSY 

BIS6 -(R0),P.BUSY*1(R5) ;SET MAIN PARTITION BUSY 





CALL 


$LOADT 




PUT TASK IN LOADER QUEUE 




BR 


10$ 




GO AGAIN 


30S: 


.IF DF 


C$$CKP 




REF LABEL 




TSTB 


P.BUSy(R2) 




■MAIN PARTITION REQUESTED 




BMI 


50$ 




•IF MI YES 




MOV 


P.TCB(R2). 


R1 


■GET OWNER TASK TCB ADDRESS 




CALL 


$TSTCP 




■SHOULD TASK BE CHECKPOINTED? 




BCS 


A0$ 




■IF CS NO 




CALL 


$ICHKP 




■INITIATE CHECKPOINT 




.IFTF 








40S: 


MOV 


(M).M 




; POINT TO NEXT TCB 




BR 


20% 




1 




.IFT 








SOS: 


MOV 


R5.R0 




;COPY MAIN PCB ADDRESS 


60$: 


BITB 


P.BUSV(RO) 


.P.BUSV+KRO) ;1S THIS PARTITION BUSY? 




BEQ 


70$ 




■IF EQ NO 




MOV 


P.TCB(RO), 


R1 


;GET OWNER TCB ADDRESS 




CALL 


$TSTCP 




■SHOULD TASK BE CHECKPOINTED? 




BCS 


100$ 




■IF CS NO 


70$: 


MOV 


P.SUB(RO). 


RO 


IGET NEXT PARTITION PCB ADDRESS 




BNE 


60$ 




■IF NE MORE TO GO 


80$: 


BITB 


P.BUSy(R5) 


,P.BUSYO{R5) ;1S THIS PARTITION BUSY? 




BEQ 


90$ 




■IF EQ NO 




MOV 


P.TCB{R5). 


R1 


■GET OWNER TCB ADDRESS 




CALL 


$ICHKP 




; INITIATE CHECKPOINT 


90$: 


MOV 


P.SUB{R5). 


R5 


;GET NEXT SUBPARTITION PCB 




BNE 


80$ 




;IF NE MORE TO GO 




.IFF 








S0$: 








■REF LABEL 



.IFTF 
RETURN 

.IF DF D$$YNMIM$$MGE 

MOV T.PCB(R4).R4 

CALL $FNDSP 

MOV P.SIZE(R4),R0 

MOV P.TCB(R4).R4 

BCC 2i$ 

.IF DF C$$CKP 



.•EXIT 



POINT TO TASK PCB 

ATTEMPT TO FIND SPACE IN PARTITION 

SAVE SIZE OF PARTITION 

RESTORE TCB ADDRESS 

IF CC SPACE WAS FOUND 



••t* 6 4 •*** 



BrQ» MArnn minft u-brr-77 90:0^ PAGF P-1P 



1 



REQSB MACRO MHOS U-DEC-77 20:05 PAGE 2-12 



150$: 
160S: 



165S: 
170$: 



180$: 
190$: 



200$: 



205$: 
210$: 



210$: 



MOV 
MOV 
MOV 
BEQ 



BIT 
BNE 

.ENDC 



MOV 

CALL 

BCC 

MOV 

MOV 

ADD 

BR 

CLR 

MOV 

BNE 

MOV 

ADD 

ADD 

SUB 

CMP 

BLO 

MOV 

MOV 

MOV 

CALL 

CMP 

BNE 



P.REL(R5),R3 
R5,R2 

P.$UB(R2),R2 
210$ 



SET BASE ADDRESS OF FIRST HOLE 
SET ADDRESS OF PREVIOUS PCB 
GET ADDRESS OF NEXT PCB 
IF EQ ALLOCATION FAILURE 



.IF DF L$$DRV!P$$LAS 



RETURN 
MOV 
BEQ 
JMP 

.IFF 

RETURN 

.ENQC 

.IFF 

RETURN 



#PS. DRVIPS.COM, P. STAT(R2) .-DRIVER OR COMMON PARTITION? 
165$ :IF NE YES 



P.TCB(R2).R1 

$TSTCP 

170$ 

R2,RS 

P.REL(R5),R3 

P.SIZE(R5).R3 

160$ 

-(SP) 

P.SUB(R2).R1 

180$ 

P.MAIN(R2),R1 

P.S1ZE(R1),(SP) 

P.REL(R1).(SP) 

R3,(SP) 

(SP)*,R0 

160$ 

R2,R4 

P.SUB(R5),R5 

P.TCB(R5),R1 

$ICHKP 

R4.R5 

200$ 



.IF DF D$$SHF 



$SHFPT.R0 

205$ 

$EXRQN 



GET TCB ADDRESS OF OWNER TASK 

CAN TASK BE CHECKPOINTED? 

IF CC VES 

SAVE ADDRESS OF PREVIOUS PCB 

CALCULATE NEW HOLE BASE ADDRESS 



INITIALIZE TOP OF HOLE 

GET ADDRESS OF NEXT PCB 

IF NE ONE EXISTS 

RETRIEVE ADDRESS OF MAIN PCB 

CALCULATE ADDRESS OF TOP OF HOLE 

CALCULATE SIZE OF HOLE 
HOLE BIG ENOUGH? 
IF LO NO 

SAVE ADDRESS OF LAST PCB 
GET ADDRESS OF NEXT PCB 
GET ADDRESS OF TASK TCB 
INITIATE CHECKPOINT 
LAST PCB TO EXAMINE? 
IF NE NO 



GET TCB ADDRESS OF MEMORY SHUFFLER 
IF EQ SHUFFLER NOT PRESENT 
REQUEST SHUFFLER TO RUN 



TMIII 
TM11 
TM11 
TMIli 



•••• H 4 *••* 



REQ^B MACRO M110R U-DEC-77 20:05 PAGF 2-13 



REQSB MACRO MIIOB U-DEC-77 20:05 PAGE 2-13 









.ENDC 
.ENDC 



**-SFNDSP-FIND SPACE IN PCB LIST 

THIS ROUTINE IS CALLED TO FIND SPACE WITHIN A DyNAMICALLY ALLOCATED 
PCB LIST REPRESENTING THE ALLOCATION STATE OF A SYSTEM CONTROLLED 
PARTITION OR DYNAMIC CHECKPOINT FILE. 



INPUTS: 



R4»ADDRESS OF PCB TO FIND SPACE FOR 

RS'AODRESS OF MAIN PCB FOR SPACE IN WHICH TO ALLOCATE 



OUTPUTS: 



C<:0 IF ALLOCATION WAS SUCCESSFUL 

SUB PCB IS LINKED INTO ALLOCATION LIST 
C=1 IF ALLOCATION FAILURE 

R0.R1,R2 ARE MODIFIED. 



.IF OF DSSYNMIMSSMGEIDtSYNC 



IFNOSP: 


:MOV 


R5,R0 




MOV 


P.REL(R5),R2 


10S: 


MOV 


P.SUB(R0).R1 




BEQ 


20S 




MOV 


P.REL<R1).-(SP) 




SUB 


R2.(SP) 




CMP 


(SP)*.P.S1ZE(R4) 




BHIS 


50$ 




MOV 


RI.RO 




MOV 


r\REL(R1),R2 
P.SIZf(R1).R2 




ADD 




BR 


10$ 


20S: 


MOV 


P.REL(R5),-(SP) 




ADD 


P.SIZE(R5).(SP) 




SUB 


R2,(SP) 




CMP 


(SP)*.P.SI7E(R4) 




BLO 


R2.P.REL(R4) 


50t: 


MOV 




MOV 


R4.P.SU8(R0) 




MOV 


R1.P.SUB(R4> 



40$: 



RETURN 
.ENDC 



,m 



COPY ADDRESS OF MAIN PCB 

SET HIGHEST ADDRESS IN LAST PARTITION 

GET ADDRESS OF NEXT PCB 

IF EQ END OF LIST 

CALCULATE SIZE OF HOLE 

;HOLE BIG ENOUGH? 

IF HIS YES 

SAVE ADDRESS OF PREVIOUS PCB 

CALCULATE BASE ADDRESS OF NEXT HOLE 



CALCULATE SIZE OF LAST HOLE 



;HOLE BIG ENOUGH? 

IF LO NO 

SET ADDRESS OF TASK PARTITION 

LINK ALLOCATED PARTITION TO PREVIOUS 

LINK NEXT TO TASK PCB 



•••• I 4 tt** 



KQ^B lUrRn M110M 14-DFC-T/ ?0:0S PAGE 2*14 



1 



REQSB MACRO M1108 U-DEC-77 20:05 PAGE 2'^^ 



**-»TSTCP-TEST IF CHECKPOINT SHOULD BE INITIATED 
INPUTS: 



R1 -ADDRESS OF THE TCB OF THE OWNER TASK. 
RA'ADDRESS OF THE TCB OF THE REQUESTED TASK. 



OUTPUTS: 



C=0 IF CHECKPOINT SHOULD BE INITIATED. 
CI IF CHECKPOINT SHOULD NOT BE INITIATED. 



$TSTCP:: t 

.IF DF SSSWPCIDSSISK 

MOV R5,-(SP) ;SAVE R5 

.IFTF 

BIT #T2.STP,T.ST2(R1) .-TASK STOPPED FOR TERMINAL INPUT? 

.IF DF ASSTRP 



3S: 



41 1 



BEQ 
TST 
BEQ 


1% 

T.ASTL(RI) 
5$ 


;IF EQ NO 

.•TASK HAVE PENDING AST? 

;IF EQ NO 

jREF LABEL 


.IFF 






BNE 


St 


;1F NC YES 


.ENDC 







.IFT 

MOV 

BIT 

BNE 

MOV 

MOV 

MOVB 

CLR 

BIS8 

ADD 

CMP 

BIE 

iff 
CMPB 



«St$WPR,R; .-PICK UP INITIAL PRIORITY DIFFERENCE 
#TS.CKP!TS.CKR!TS.0UT,T.STAT(R1) .-TASK IN MEMORY? 



T.PCB(R1).R5 

P.NDR(RS),R5 

H.SPRI(R5).R5 

-(SP) 

T.PRI(R1).(SP) 

{SP)»,R5 

T.PR|(R4).R5 

101 



IF NE NO 

POINT TO TASK PCB 

POINT TO TASK HEADER 

PICK UP SWAPPING PRIORITY 

EXTRACT TASK PRIORITY BYTE 

CALCULATE EFFECTIVE PRIORITY 
Rf QUESTED TASK HIGHER PRIORITY? 
IF LE NO 



T.PRI(R«).T.FRI{R1) .REQUESTED TASK HIGHER PRIORITY? 



•••• J 4 •••• 



Bcncb MAmn mina ii._hrr.77 90iA< itAfir 9-19 



REQSB MACRO M1108 U-DEC-77 20:05 PAGE 2-15 



5$: 



10S: 
20$: 



BLOS 

.IFTF 

CLC 
BIT 
BEQ 
SEC 



.IFT 

nov 

.ENDC 



10S 



;IF LOS NO 



; ASSUME TASK CHECKPOINTABLE 
#T2.CKD!T2.CHK!T2.FX0!T2.HLT.T.ST2(R1) ;IS IT? 
20S :IF EQ TASK CAN BE CHECKPOINTED 

.•INDICATE NO CHECKPOINT 

;REF LABEL 



(SP)*.R5 



; TM068 

.•♦•-1 



; RE STORE R5 



RETURN 



; 



**-$ICHKP-INITIATE CHECKPOINT 
INPUTS: 

R1»A0DRESS OF THE TCB OF THE TASK TO BE CHECKPOINTED. 



«TS.0UT,T.STAT(R1) .-TASK BEING READ IN? 

2C» :1F NE YES 

«TS.CKP.T.STAT(R1) ;TASK ALREADY BEING CHECKPOINTED? 

SOS :IF NE YES 

R1.R0 ;SET ADDRESS OF TCB 

tSETCR .-SET A CONDITIONAL SCHEDULE REQUEST 

RO.RI .'RESTORE ADDRESS OF TCB 

T.IOC(RI) ;I/0 IN PROGRESS 

SCKKPT :IF EQ NO 

ifTS.CKR.T.STATCRl) ;SET CHECKPOINT REQUEST 



•••-fCHKPT-CHECKPOINT TASK 

THIS ROUTINE IS CALLED TO CHECKPOINT A TASK. 

INPUTS: 

R1«A0DRESS OF THE TCB OF THE TASK TO BE CHECKPOINTED. 

OUTPUTS: 

THE CHECKPOINT FLAG IS SET IN THE TASK STATUS WORD, THE TASK 
IS PLACED IN THE LOADER QUEUE. AND THE LOADER IS REQUESTED 
TO CHECKPOINT THE TASK. 



i 


RI^ADDI 


;- 




SICHKP: 


:BIT 




BNE 




BIT 




BNE 




MOV 




CALL 




MOV 




TSTB 




REQ 


201: 


BIS 


SOS: 


RETURN 



tCHKPTt: 



•••• K 4 •••• 



tttatM MArnn MIIOR U-bFr-77 ?0:0^ PAGF ?-16 



REQSB MACRO MHOS U-OEC-77 20:05 PAGE 2-16 



913 
91A 
915 
916 
917 
918 
919 
920 
921 
922 
923 
92A 
925 
926 
927 
928 
929 
930 
931 
932 
933 
93* 
935 
936 
937 
938 
939 
9<.0 
941 
9A2 
943 
9A4 
945 
946 
947 
948 
949 
950 
951 
952 
953 
954 
955 
956 

^ 

959 



101: 



20t: 



25»: 

SOS: 



,IF DF DSSYNC 



sot: 



SAVNR 




BIC 


#T2.CAF,T.ST2(R1) 


NOV 


R1.R3 ; 


MOV 


#P.SIZE*2.R1 ; 


CALL 


SALOCB 


BCS 


20S ; 


NOV 


RG.R4 ; 


ADD 


R1 .RO 


NOV 


T.PCB(R3),R1 


NOV 


P.SIZE(R1).-(R0) 


.IF DF 


NSSNGE 


ADD 


#7.(R0) 


ROR 


(RO) 


ASR 


(RO) : 


ASR 


(RO) 


.IFF 




ADD 


#777, (RO) 


CLRB 


(RO) 


SWAB 


(RO) ; 


ASR 


(RO) 


.ENDC 




NOV 


#tCFLPT.R5 


NOV 


(R5),R5 


BNE 


301 


NOV 


R4.R0 


NOV 


#P.SI«»2,R1 ; 


NOV 


R3,R5 


CALL 


tDEACB 


NOV 


R5.R3 ; 


NOV 


R3.R1 : 
#T2.CAF,T.ST2(R3) 


BIS 


BIT 


*T3.CAL.T.ST3(R3) 


BNE 


50» 


NOV 


STKNPT.RO ; 


BE a 


251 


Tsr 


T.STAKRO) 


BNI 


tEXRQN 


RETURN 




TST 


P.REL(R5) ; 


BNE 


10S 


CALL 


IFNDSP 


BCS 


101 


NOV 


R5,P.NAIN(R4) 


NOV 


R3.R1 ; 


NOV 


R4,T.CPCB(R1) ; 



SAVE R4 AND R5 

; CLEAR CHECKPOINT ALLOCATION FAILURE 
COPY TCB ADDRESS 
SET SIZE OF CHECKPOINT PCB 
ATTENPT TO ALLOCATE PCB 
IF CS ALLOCATION F'lLURE 
COPY ADDRESS OF AL ICATED PCB 
POINT TO END OF ALLOCATED PCB 
POINT TO TASK PCB 
.-SET SIZE OF TASK PCB 



ROUND TO NEXT DISK BLOCK 
CONVERT TO DISK BLOCKS 



ROUND TO NEXT BLOCK BOUNDARY 

CLEAR EXCESS BITS 

CONVERT TO 256. WORD BLOCKS 



POINT TO FIRST CHECKPOINT FILE PTR 

GET NEXT CHECKPOINT FILE PCB ADDRESS 

IF NE THERE IS ONE 

ELSE GET ADDRESS OF CHECKPOINT PCfe 

SET ITS SI/E 

SAVE TCB ADDRESS 

DEALLOCATE CHECKPOINT PCB 

RESTORE TCB ADDRESS 

RESTORE TCB ADDRESS 
.-SET CHECKPOINT ALLOCATION FAILURE 
;CHECKP01NT SPACE ALLOCATED WITH TASK? 

IF NE YES 

ELSE POINT TO TKTN TLB 

IF EQ TKTN NOT INSTALLED 

TKTN ALREADY ACTIVE? 

IF Nl NO 

ALLOCATION tN THIS FILE TURNED OFF? 

ATTENPT TO ALLOCATE SPACE IN FILE 

IF CS ALLOCATION FAILURE 

SET NAIN PCB POINTER 

COPY TCB POINTER 

SET ADDRESS OF CHECKPOINT PCB 

REF LABEL 



*••* L 4 **** 



Mnt.li MAran Mlirui U.h»r.77 iO'M PACF 9-17 



1 



REQSB MACRO Ml 108 U-DEC-77 20:05 PAGE 2-17 



970 
971 
972 
973 
97A 
975 
976 
977 
978 
979 
980 
981 
982 
985 
984 
985 
986 
987 
988 
989 
990 
991 
992 
993 
994 
995 
996 
997 
998 
999 
1000 
1001 
100? 

iKs 

1U04 
1005 
1006 
1007 
1008 
1009 
1010 
1011 

!8;i 

1QU 
1015 

1017 

1019 
1020 
1021 
1022 
102? 

18?, 

1026 



000440 012746 OOOOOOG 

000444 000402 

000446 012746 OOOOOOG 

000452 062700 0OO01? 

000456 

000460 162700 000012 



.ENDC 

BIS 
.ENDC 



#TS.CKP,T.STAT(R1) ;SET CHECKPOINT IN PROGRESS BIT 



**-»LOAOT-PUT TASK IN LOADER QUEUE 

THIS ROUTINE PUTS A TASK IN THE LOADER QUEUE FOR AN INITIAL LOAD OR 
A CHECKPOINT OPERATION. 

INPUTS: 

R1 'ADDRESS OF TASK CONTROL BLOCK 
OUTPUTS: 

NONE 



tLOADT::MOV 
.ENDC 



ILDRPT.RO 



.•PICK UP TCB ADDRESS OF LOADER 



;♦ 



••-fEXRflP-EXECUTIVE REQUEST WITH QUEUE INSERT Br PRIORITY 
••-lEXRQF-EKECUIlVE REQUEST WITH QUEUE INSERT FIFO 
**-tEXRQN-EXECUTIVE REQUEST WITH NO QUEUE INSERTION 

THESE ROUTINES PROVIDE A STANDARD INTERFACE TO ALL TASKS REQUESTED BY 
THE EXECUTIVE. 



INPUTS: 



RO-TCB ADDRESS OF TASK TO REQUEST 

RI'ADDR OF PACKET TO QUEUE TO TASK (IF ENTRY AT SEXRQP/tEXRQF) 



OUTPUTS: 

C-O 
C«1 



IF 

IF 



THE REQUEST WAS SUCCESSFULLY COMPLETED. 
THE TASK WAS NOT SUCCESSFULLY REQUESTED. 

Z'O IF PCS ALLOCATION FAILURE. 

Z'1 IF TASK ACTIVE. BEING REMOVED. OR BEING FIXED. 



rM0B6 
TM086 

TM086 

•••-1 



tlXRQP: 

tEXRQF : 
It: 



.ENABL 
;M0V 

BR 
iMOV 

ADD 

CALL 

SUB 



LS8 

*tQINSP.-(SP) 

IS 

flOlNSF.-(SP) 

fT.RCVL.RO 

8(SP)t 

fT.RCVL.RO 



.PUSH ADDR OF QUEUE INSERT BY PRIORITY 

;JOtN COMMON CODE 

;fUSH ADDR OF QUEUE INSERT FIFO 

.POINT TO TASK RECEIVE LIST 

.•INSERT PACKET IN RECEIVE QUFUE 

;POtNT BACK TO START OF TCB 



•••• n 4 **•• 



MQtB MArkn Mlinil U-brr-77 ?0:05 PAGF ?-1l 



REQSB NACRO MIIOB U-OEC-77 20:05 PAGE 2-18 



1027 000A6A 

1028 000A72 

1029 000474 

1030 000502 

1031 000506 
1032 

1033 
103A 
1035 
1036 
1037 
1038 
1039 
10A0 
1041 
1042 
1043 
1044 
1045 
1046 
1047 
1048 
1049 
1050 
1051 
1052 
1053 
1054 
1055 
1056 
1057 
1058 

1059 000510 

1060 000514 

1061 000514 

1062 000516 

1063 000522 

1064 000526 

1065 000530 

1066 000532 

1067 000536 

1068 000540 

1069 000544 

1070 000546 
1071 

1072 
1073 
1C74 
1075 
1076 
1077 
1078 
1079 

188? 

1082 
108! 



032760 000060 000034 

001405 

042760 000060 000034 

005001 



016702 OOOOOOG 

010003 

062703 000032 

012746 100000 

031625 

001417 

032723 004000 

001014 

032713 020000 

001011 

024545 



SEXRQN::BIT 
BEQ 
BIC 
CALL 

2$: CLR 

.DSABL 



<rT2.STP*2!T2.STP.T.ST2(R0) .-TASK STOPPED? 
2t ;IF EQ NO 

#T2.STP«2!T2.STP.T.ST2(R0) .-CLEAR TASK STOP BIT 
SSETCR .-SET CONDITIONAL SCHEDULE REQUEST 
R1 ;USE DEFAULT UlC 

LSB 



**-tTSKRT-TASX REQUEST (DEFAULT UCB) 
**-tTSKRQ-TASK REQUEST (SPECIFY UCB) 
••-STSKRP-TASK REQUEST (SPECIFY DEFAULT UlC) 

THIS ROUTINE IS CALLED TO REQUEST THE EXECUTION OF A TASK. 

INPUTS: 

RO^ADDRESS OF THE TCB OF THE TASK TO BE REQUESTED. 

RIsREQUEST UIC. 

R2«UCB ADDRESS IF ENTRY AT STSKRQ. 

R30EFAULT UIC IF ENTRY AT $TSKRP. 



OUTPUTS: 



i 
t 
I 



»TSKRT: 
ITSKRP: 
STSKR'l: 



C>1 IF TASK IS ALREADY ACTIVE OR IS BEING FIXED IN MEMORY. 

2«1 IF TASK ACTIVE OR BEING FIXED. 

Z«0 IF PCB ALLOCATION FAILURE. 
C»0 IF THE REQUEST IS SUCCFSSFULLY COMPLETED. 



,IF NOF MSfMUP 



$TSKRT: 
ITSKRQ: 
STSKRP: 



:MOV 

Imov 

ADD 
MOV 
BIT 
BEQ 
BIT 
BNE 
BIT 
BNE 
CMP 

.IFF 

:MOV 
:MOV 
:MOV 

iiT 

BNE 
BIT 
BNE 

MOV 



tC0PT.R2 

R0,R3 

#T.STAT,R3 
#TS.KXE.-(SP) 
(SP).(R3)* 

#Ti.9FX.(R3)» 

lot 

#T3.REM.(R3) 

10S 

•(R3).-(R3) 



GET ADDRESS OF COMMAND OUTPUT UCB 

REF LABEL 

POINT TO TASK STATUS WORD 

ASSUME TASK IS ACTIVE OR BEING FIXED 

TASK ALREADY ACTIVE? 

IF EQ YES 

TASK BEING FIXED? 

IF NE YES 

WMOVf ON EXIT? 

IF NF YES 

POINT BACK TO FIRST STATUS WORD 



.:0PT.R2 

R1,R3 

#TS.EXE,-(SP) 

(SP).T.STAT(RO) 

10$ , 

#T?.BFX.r.ST2(R0) 



GET ADDRESS OF COMMAND OUTPU) UCB 
MAKE CURRENT UIC DEFAULT UIC 
ASSUME TASK IS ACTIVE OR BEING MXED 
TASK ALREADY ACTIVE? 
IF EQ YES 

TASK BEING FIXED? 



101 ,lf NE YES 

fT5.nEM,T.ST!(R0) ;REMOVE TASK ON EXIT? 
101 ;IF NE YtS 

R!,T.ACU(RO) .SET DEFAULT UIC 



•••• N 4 •••• 



REQSB »<WCRO M1108 U-DEC-77 20:05 PAGE 2-19 



1084 
1085 
1086 
1087 
1088 
1089 
1090 
1091 
1092 
1093 
109A 
1095 
1096 
1097 
1098 
1099 
1100 
1101 
1102 
1103 
110A 
-105 
1106 
1107 
1108 
1109 
1110 
1111 
1112 
1113 
11U 
1115 
1116 
1117 
1118 
1119 
1120 
1121 

ill! 

1124 
1125 
1126 
1127 
1128 
1129 
1150 
1131 

'1 
'1 
^^ 
'1 
\^\ 

1U0 



000550 041623 

000552 005016 

000554 010160 000022 

000560 010260 000026 



R0.R3 
#T.STAT,R3 



(SP).(R3)t 
(SP) 

RI.T.EFLG(RO) 
R2,T.UCB(R0) 



DSSISK 

#T2.FXD,(R3) 
20S 



.IF DF DSSrNWnSSMGE 



MOV 
ADD 

.ENDC 



BK 

CLR 
MOV 
MOV 



.IF DF 
BIT 



MOV 

BIT 

BCQ 

MOV 

MOV 

CALL 

MOV 

MOV 

ROR 

BEQ 

BIS 

INC 

BR 

NOV 

NOV 

TST 

NOV 

NOV 

NOV 

CLR 

NOV 

CLR 

NOV 

CLR 

NOV 

CLR 

NOV 

NOV 

CLR 



CIR 
NOV 



.•POINT TO TASK STATUS WORD 



SET TASK ACTIVE 

CLL^R FAILURE INDICATOR 

SAV£ REQUEST UK 

SET ADDRESS OF 'TI' UCB 



;TASK FIXED IN NEMORY? 
;1F NE YES 



T.PCB(R0},R1 :GET ADDRESS OF TASK PCB 
#PS.SYS,P.STAT(R1) .-SYSTEM CONTROLLED PARTITION? 



71 

RO,-(SP) 

#P.LGTH.R1 

tALOCB 

R0,R2 

(SP)»,RO 

(SP) 

3S 

(SP).T.STAT(RO) 

(SP) 

10$ 

T.PCB(R0).R1 

R2.T.PCB(R0) 

(R^)« 

T.PRI(R0).(R2)^ 

P.NAM(R1).(R2)t 

P.NAM«2(R1),(R2) 

(R2)« 

R1,(R2)* 

(«»?)♦ 

T.NXSZ(R0).(R2)« 

(R2)* 

T.MXSZ(RU).(R2>» 

(R2)* 



IF EQ NO 

SAVE TASK TCB ADDRESS 

SET LENGTH OF BLOCK NEEDED 

ALLOCATE PCB 

SAVE ADDRESS OF ALLOCATED BLOCK 

RETRIEVE TASK TCB ADDRESS 

CAPTURE CARRY BIT 

IF EQ ALLOCATION WAS SUCCESSFUL 

SET TASK INACTIVE 

SET ALLOCATION FAILURE 

GET MAIN PARTITION PCB ADDRESS 
SET ADDRESS OF ALLOCATED PCB 
SKIP OVER LINK WORD 
SET PRIORITY AND I/O COUNT 
INSERT PARTITION NAME 



CLEAR POINTER TO NEXT SUBPARTITION 
SET BACK POINTER TO MAIN PARTITION PCB 
CLEAR RELOCATION BASE 
;SET PARTITION SIZE IN 32W BLOCKS 
CLEAR WAIT QUEUE POINTER 
;IN1T1ALLI;E SWAP SIZE 
CLEAR PARTITION rfUSY FLAGS 
R0.(R2)* ;SET OWNER TCB ADDRESS 
«P$.SYS!PS.DEL.(II2)* (SYSTEM CONTROLLED. MARKED FOR DEL 
11^2)* ;INIT1ALIY CLEAR HEADER POINTER 



.IF DF PtiLAS 



(R2>* 

%iV. 

R1.(R2)« 



CLEAR PR0TEC1I0N WORD 

SAVE POINTER TO ArTACHN|NT LtSTHEAD 

SET UP ATTACHNEN1 LISThIAD 



•••• 



rr 



••t* 



rr. 



- «« «A . Aa 



REQSB MACRO Ml 108 1 OEC-77 20:05 PAGE 2-20 



1U1 

1H2 

1H3 

1UA 

11A5 

1U6 

1U7 

1U8 

1U9 

1150 

1151 

1152 

1153 

115A 

1155 

1156 

1157 

1158 

1159 

1160 00056A 

1161 

1162 

1163 

116A 

1165 

1166 

1167 

1168 000570 006326 

1169 

1170 

1171 

1172 

1173 000572 

1174 

1175 

1176 

117" 

1178 

1179 

1180 

1181 

1182 

1183 

11(k 

1185 

1186 

1187 

1188 

1189 

1190 

1W1 

1192 

1193 

im 

1195 
1196 
1197 



.ENDC 



.ENDC 



10$! 

20ti 
501: 
lOtt 



MOV 
MOV 
CALL 
BK 


R0.R1 

T.PCB(R0).R0 

P.MAIN(R0).RO 

#P.WAIT,RO 

SQINSP 

R1.R0 

T.PCB(R0).R0 

SNXTSK 

30S 


.IFTF 




CALL 


SBJLDS 


• IFT 




ASL 


(SP;* 


.IFF 




ASL 


(SP)* 


.ENDC 





COPY TASK rCB ADDRESS 

GET ADDRESS OF TASK PCB 

GET ADDRESS OF MAIN PARTITION PCB 

POINT TO PARTITION WAIT QUEUE LIS1HEAD 

PUT TASK IN PARTITION WAIT QUEUE 

RESTORE TCB ADDRESS 

GET ADDRESS OF TASK PARTITION PCB 

SELECT NEXT TASK 



; BUILD A STACK FOR TASK 



:SET SUCCESS/FAILURE INDICATION 



.•SET SUCCESS/FAILURE INDICATION 



RETURN 



•♦-SUI SET-ESTABLISH DEFAULT UK AND CURRENT UlC 

THIS ROUTINE ESTABLISHES DEFAULT AND CURRENT FOR REQUESTED TASKS 
IN MULTI-USER SYSTEMS. 



INPUTS: 



RI'f'CQUEST UIC 

R2*ADDRESS OF SECOND STAlUS WORD OF CURRENT TASK 

R^cADDRESS OF HEADER OF CURRENT TASK 



OUTPUTS: 



RI'CURRENT UlC 

r3«d:fault u>c 

c«1 if nonprivileged task is trying to change ulc 
c'o otherwise 



.IF DF 
>UISET!:f!OV 



MSSMUP 
H.DUIC(R4).R3 



.PROPAGATE DEFAULT UlC 



•«•* c 5 •«%• 



rzzT 



AAA #< ^A ^« 4 nm 



4 1.-1^^-99 ^A . (\t AAAC 9.91 



REQSB MACRO Ml 108 U-OEC-77 20:05 PAGE 2-21 



1198 
1199 
1200 
1201 
1?02 
1203 
120A 
1205 
1206 
1207 
1208 
1209 
1210 
1211 
1212 
1213 
121A 
1215 
1216 
1217 
1218 
1219 
1220 
1221 
1222 
1223 
122A 
1225 
1226 
1227 
1228 
1229 
1230 
1231 
1232 
1233 
1234 
1235 
1236 
1237 
1238 
1239 
1240 
1241 
1242 
1243 
1244 
1245 
1246 
1247 
1248 
1249 
1250 
1251 

JH 

1254 





TST 


01 




BEQ 


10S 




MOV 


R1.R3 
/rT3.PRV.2(R2) 




BIT 




BNE 


20S 




CMP 


R1,H.CU1C(R4) 




BEQ 


loi 




SEC 




:o$: 


MOV 


H.CUIC(R4),:<1 


20$: 


RETURN 





UlC SPECIFIED? 

IF EQ NO 

USE SPECIFIED UIC 

CURRENT TASK PRIVILEGED? 

IF NE VES 

NONPRIVILEGED TASK CHANGING UIC? 

IF EQ NO 

ELSE RETURN C-BIT SET 

FORCE PROPAGATION OF CURRENT UIC 



; 



.ENDC 



•*-$MAPTK-MAP TASK ADDRESS WINDOW 

THIS ROUTINE IS CALLED TO MAP THE FIRST WINDOW BLOCK IN A TASK'S 
HEADER IN A MAPPED SVST^i^ FROM ITS PCB AND TCB. 



INPUTS: 



R1 'POINTER TO NUMBER OF WINDOW BLOCKS IN THE TASK HEADER. 
R5»ADDRESS OF THE TASK CONTROL BLOCK FOR THE TASK. 



OUTPUTS: 





.IF 


DF 


MtSMGE 




SMAPTK: 


:TST 
MOV 
MOV 




(RD* 

T.PCB(R5) 

R2.(R1)* 


.R2 




.IF 


DF 


PStLAS 





RI^ADDRESS OF LAST PDR IMAGE IN TASK HEADER. 
R2 IS MODIFIED. 



;POINT TO TASK WINDOW BLOCK 
;PICK UP TASK PCB ADDRESS 
;riCT TASK PCB ADDRESS (W.8PC8) 



BIT #T3.ROV,T.ST3(R5) ;TASK HAVE .'^^iDENT OVERI AYS? 

BNE IDS ;IF NE YES. DON'T CHANGE WINDOW BLOCK 

.IFTF 

MOV (R1)»,(R1) ;1NIT HIGH VIRT ADDR (W.BLVRXW.BHVR) 
MOV P.SI2E(R2),R2 .PICK UP PARTITION SIZE 

An 

SM T.OFF(R5).R2 .REDUCE BY TASK OFFSET IN PARTITION 

.IFTF 



MOV R2,"(SP) 

SWAB (SP) 



;PUSH REQUIRED WINDOW S12E 
.•CONVERT TO BYTES 



•t** D 5 **** 



i^ ^ 



-••« "kA-AC 



MAJI* 9—9^ 



"L 



REQSB MACRO Ml 108 U-DEC-77 20:05 

1255 
1256 
1257 
1258 
1259 
1260 
1261 
1262 
126S 
1264 
1265 
1266 
1267 
1268 
1269 
1270 
1271 
1272 
1273 
127A 
1275 
1276 
1277 
1278 
1279 
1280 
1281 
1282 
1283 

1287 

1288 000001 



PAGE 2-22 




RORB 

ROR 

ROR 

ADD 

DEC 


(SP) 

(SP) 

(SP) 

(SP)*.(R1) 

(R1)t 


.IFT 




TST 
MOV 
NOV 
INC 


(RD* 
R2.(R1)* 
T.0FF(R5),(R1)* 
R1 


.IFF 




ADD 


«W.BNPD-W.BATT, 


.ENDC 




ASL 
SWAB 
SUB 
SBC 
MOVB 
ROR 
NOV 
NOVB 
10S: RETURN 


R2 

R2 

#377, R2 

R2 

R2,(R1)* 

R2 

R2.(R1) 

«6.(R1) 



COMPLETE HIGH VIRTUAL ADDRESS (W.6HVR) 



POINT TO WINDUW SIZE (W.BATT) 
SET WINDOW SIZE (W.BSIZ) 
SET OFFSET IN PARTITION (W.60FF) 
POINT TO NUMBER OF PDR'S 



SHIFT » PDR'S TO HIGH BYTE 

i PDR'S TO LO BYTE. LAST PDR SIZE TO HI 

INC » PDR'S I DEC LAST PDR SIZE 

IF CS, EVEN BOUNDARV, REDUCE » PDR'S 

SET NUMBER OF PDR'S (W.BNPD) 

ADJUST CO«)RECT SIZE 

SET SIZE FOR LAST PDR (W.BLPD) 

SET FOR READ/WRITE ACCESS (W.BLPD) 



.ENDC 



.END 



*•** [ ) •••• 



MatM MArnn Mlin* U-bfC-77 ^OtO^ PAGF ?-23 



REQSB 


MACRO mi 08 U-DEC-77 20:05 PAGE 


2-23 




SVI«OL 


TABLE 










AS.OEL= 


000010 


H.TKVL 


000030 
000056 


R$$JP1= 


000001 


AS.EXTs 


OOOOOA 


H.VEXT 


RS$JS1< 


000001 


AS.REOs 


000001 


H.WNO 


000044 


RtSKlls 


000001 


AS.MT: 


000002 


KSSCNT- 


177546 


R»$P11= 


000001 


A. IOC 


000003 


KStCSR' 


177546 


RStXlls 


000001 


A.LGTH* 


OOOOU 


KSSIENs 000115 


RSS1in< 000000 


A.MPCT 


000011 


KttLDC- 


000001 


RStlISs 


000000 


A.PCB 


000012 


K$ITPS» 


000074 


SSSECCs 


000000 


A.PCBL 


000000 


MttCRB^ 


000124 


StSVSZ:: 


001000 


A.PRI 


000002 


PS.APRr 


000007 


TS.BLK> 


170700 


A.STAT 


000010 


PS.CHK* 


010000 


TS.CICP= 


000200 


A.TCB 


OOOOOA 


PS.CKPs 


040000 


TS.CKR" 


000100 


A.TCBl. 


000006 


PS.CKRs 


020000 


TS.EXE* 


100000 


CSSORE< 


000400 


PS.C0«« 000200 


TS.«S6» 


020oeo 


HtMTZ« 


000074 


PS.OELs 


000010 


TS.NRP« 


01000c 


H.CSP 


000000 


PS.DRV= 


000020 


TS.OUT- 


000400 


H.CUIC 


000010 


PS.FXD= 


004000 


TS.RDN* 


040000 


H.DSy 


000046 


PS.LI0= 


001000 


rS.RUN* 004000 


H.DUIC 


000012 


PS.NSFs 


000400 


T$SA11> 


000001 


H.EFLM 


000004 


PS.OUT» 


100000 


T$SC11« 


000001 


H.EFSV 


000040 


PS.PER« 


002000 


TI$J16« 


000001 


M.rcs 


000050 


PS.PIC« 


000100 


TSSKW 


000000 


H.FORT 


000052 


PS.SYS« 


000040 


TSSM11> 


000001 


H.FPSA 


000042 


P.BLKS 


000016 


T.ACTL 


000052 


H.FPVA 


000034 


P.BUSY 


000024 


T.ASTL 


000016 


H.GARO 


000072 


P.HDR « 


••••*• GX 


T.ATT 


000054 


H.HDLN 


000002 


P. IOC 


000003 


T.CPC8 


000004 


H.IPC 


000016 


P.LNK 


000000 


T.DPRI 


000040 


M.IPS 


000014 


P.NAIN 


000012 


T.EFLG 


000022 


H.ISP 


000020 


P.NAM 


000004 


T.IOC 


000003 


H.LUN 


000076 


p.oyN 


000026 


T.LBN 


000041 


H.NLUN 


000074 


P.PRI 


000002 


T.LDV 


000044 


H.NPt. 


000061 


P.REL 


000014 


T.LNK 


000000 


H.OOVA 


000022 


P.SIZE 


000016 


T.MXSZ 


000050 


H.OCVL 


000024 


P.STAT 


000030 


T.NAM 


000006 


M.OVLY 


000054 


P. SUB 


000010 


T.OFF 


000060 


M.PFVA 


000032 


P.SWSZ 


000022 


T.PCB 


000046 


M.RCVA 


000036 


P.TCB 


000026 


T.PRI 


000002 


D.RRVA 


000062 


P.WAIT 


000020 


T.RCVL 


000012 


M.SPRI 


000060 


RttFlU 


000001 


r.RRFL 


000064 


H.TKVA 


000026 


RttJPO* 


000000 






. ABS. 


000102 000 
000574 001 










ERRORS DETECTED: 











T.SRCT 

T.STAT 

T.ST2 

T.ST3 

T.TCBL 

T.UCB 

T2.AB0= 

T2.AST= 

T2.BFX= 

T2.CAF* 

T2.CHIC= 

T2.CICD« 

T2.DST= 

T2.FX0' 

T2.HLT« 

T2.SPN« 

T2.STPX 

T2.TIC« 

T2.WFR« 

T3.ACP" 

T3.CAL« 

T3.CLI« 

T3.WR» 

T3.NET» 

T3.NSD> 

T3.PMD« 

T3.PRV' 

T3.REM« 

T3.R0V« 

T3.RST« 

T3.SLV= 

VltCTR« 

W.BATT 

W.BFPD 

W.BHVR 

W.BLGH 

W.BLPD 

W.BLVR 

W.BNPD 

W.BOFF 



000063 
000032 
000034 
000036 
00005'' 
000' . 
0001 UO 
100000 
004000 
000400 
020000 
010000 
040000 
002000 
000200 
000004 
000020 
001000 
000001 
100000 
000100 
001000 
004000 
000C20 
000200 
040000 
010000 
020000 
000040 
000400 
002000 
000400 
000006 
OCCOU 
000004 
000020 
000016 
000002 
000015 
000012 



VIRTUAL HE WRY USED: 3935 WORDS ( 16 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED IIME: 00:00:30 

C41.2O]REQS8.SY0:C41.3O]REOSB/-SF.C1.nEX£MC/ML.t41.10]RSXMC,t11.10]REOSB 



W.BPCB 

W.BSIZ 

X.DSI 

X.FORK 

X.ISR 

X.JSR 

X.LNK 

X.PSW 

X.rCB 

SABCTK 

SABTSK 

tACTHD< 

SACTRM 

SACTTK 

SBILDS 

ICEFI « 

SCOMEFs 

$COPT « 

tCURPR' 

SDRDSE* 

SEXRQF 

SEXRQN 

SEXRQP 

IOINSF> 

MINSP* 

SRQSCH* 

SSETCR 

SSETF 

SSETM 

SSETRQ 

tSETRT 

SSIGFL* 

tSRSTD 

ISTPCT 

SSTPTX 

$TXTCB« 

STSKHD* 

tTSKRP 

STSKRQ 

STSKRT 



000000 

000010 

000022 

000012 

0OUO10 

000002 

000000 

000006 

000024 

OOOOOORG 

000004RG 

*••**• 6X 

000372RG 

0001 54RG 

000056RG 

*••••• GX 

****** GX 

****** QX 

****** GX 
****** GX 

000446RG 
000464RG 
000440RG 
****** GX 
****** GX 
****** GX 
000206RG 
000266RG 
000272RG 
000234RG 
00O232RG 
*•*•*• GX 

000332RG 
000422RG 
000426RG 
•♦••*• GX 
•*••*• GX 

0005 14RG 
0005 14RG 
00051 ORG 



••#•"? 5 ••*• 




•••• Q S t*«« 



e«TtB MArnn mi inn u.hrr«77 POtO^ PACt 2 



SSTSR MACRO Ml 108 U-OEC-77 20:05 PAGE 2 



52 

33 000000 
3A 000000 

35 000000 

36 000000 



.TITLE sst:;r 

.IDENT /08/ 



COPYRIGHT (C) 197«, 1978 

DIGITAL EQUIPMENT CORPORATION, MAYNARO, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 08 

D. N. CUTLER 27-AUG-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
T. J. MILLER 

MODIFIED BY: 

T. J. MILLER 1'>SEP-77 

TM104 — CHANGE FLOATING POINT PROCESSOR LOGIC FOR 
TRANSPORTABILITY. 

SYNCHRONOUS SYSTEM TRAP (SST) SERVICE ROUTINES 

MACRO LIBRARY CALLS 

.MCALL ABODF$,HDRDFt,HWODFt,PKTDFS 



ABODFS 
HDRDFS 
HWDDFS 
PKTDFI 



LOCAL DATA 



DEFINE TASK ABORT CODES 
DEFINE TASK HEADER OFFSETS 
DEFINE HARDWARE REGISTERS 
DEFINE 1/0 PACKET OFFSETS 



FLOATING POINT EXCEPTION VECTOR (FINAL SETUP OF THIS VECTOR AND. IF 
NECESSARY, THE PIRQ VECVOR IS PERFORMED IN INITL AND THE MCR SAVE 
COMMAND.) 



; TM10* 
; TM10A 
I TM10* 



.•24* 



.IF DF 

.ASECT 

.WORD 
.WORD 

.PSICT 

.fNDC 



FSILPPIFMLTP 



IFLTRP 
PR7 



.•••-11 



•••• H 5 •••• 



«;«;T5R MACRO M110B 14-050-77 20:05 PAGf 2-1 



SSTSR MACRO M1108 U-DEC-77 20:05 PAGE 2-1 



10 000000 
11 



iH 



PAGE 2-1 










• FLOATING POINT STATJS 


ANr, 


FORK BLOCK 




• IF DF 


FMLPP 








FLSTS: .BLKW 
FLFRK: .BLKW 
FLTCB: .BLKW 


2 
2 

1 




.•FLOATING POINT STATUS 

; FLOATING POINT FORK BLOCK 

.■ADDRESS OF TCB CAUSING EXCEPTION 1RAP 


; TM10A 


.ENDC 










: SEGMENT FAULT 


VECTOR 








.IF DF 


MtSMGE 








.ASECT 
.«250 

.WORD 
.WORD 
.CSECT 


SSGFLT 
PR7 




t 





.INDC 



**-SEMSST-NON RSX EMT/TRAP INSTRUCTION 

THIS ROUTINE IS TRANSFERED TO BY THE DIRECTIVE DISPATCHER WHEN A NON RSX 
EMT OR A TRAP INSTRUCTIC^ IS EXECUTED. THE MACHINE STATE HAS ALREADY BEEN 
SAVED. THE EMT/TRAP CODE (LOW BYTE Of INSTRUCTION) IS SETUP TO BE 
PASSED TO THE USER AND CONTROL IS TRANSFERED TO THE SST EXIT ROUTINE. 



INPUTS: 



R5«ADDRESS OF THE EMT/TRAP INSTRUCTION. 



OUTPUTS: 



tEMSST: 



0*(SP)«EMT/TRAP CODE MULUPlltO BY 2. 

02(SP)=SST CODE (SCEMT'EMT, SCTRP^TRAP). 

00(SP)>NUMBER OF BYTES TO BE TRANSFERED TO USER STACK (6). 



.FNABL LS6 



.if DF MIIMGE 



;REr LABEL 



**•* 



TT 



•••• 



tiT^B MAtBn MlinR U.hir>77 ?(i'.M PkGf ?'} 



SSTSR MACRO MHOS U-DEC-77 20:05 PAGE 2-2 



1 2 

123 000000 

124 0U00O2 

125 OOOOOA 

126 000006 

127 000012 



i 



131 

132 000016 

133 000020 

134 000024 

135 000030 

1] 
' 1 



005046 
152516 
006316 

012746 000012 
132715 000001 



001402 

012716 000014 
012746 000006 
000435 



10S: 



4| 



54 000032 



MOV 
BIC 
ASL 
MOV 
BIT 

.IFF 

CLR 

BIS8 

ASL 

MOV 

BITB 

.ENOC 



BEQ 
MOV 
MOV 
BR 



(SP),R5 
#177400, (SP) 
(SP) 

*S.CEMT.-(SP) 
#400. R5 



-(SP) 

(R5)t,{SP) 

(SP) 

#S.CEMT.-(SP) 

#1,(R5) 



10S 

#S.CTRP,(SP) 
#3*2, -(SP) 
SSTXT 



GET EKT/TRAP INSTRUCTION 
CLEAR INSTRUCTION CODE 
MULTIPLY CODE BY ? 
ASSUME NON-RSX EMT INSTRUCTION 
EMT INSTRUCTION? 



PICKUP SST CODE 

MULTIPLY CODE BY 2 

ASSUME NON-RSX EMT INSTRUCTION 

EMT INSTRUCTION 



IF EQ YES-SET NUMBER OF BYTES 
SET FOR (HAP INSTRUCTION 
SET NUMBER OF BYTES 
TAKE COMMON SST EXIT R(X.'TINE 



••-SFLTRP-FL0ATIN6 POINT EXCEPTION (11/40) 

THIS ROUTINE IS TRAPPED TO WHEN AN 11/40 FLOATING POINT EXCEPTION FAULT 
OCCURS. THE CURRENT MACHINE STATE IS SAVED AND CONTROL IS TRANSFERED TO 
THE SST EXIT ROUTINE. 

INPUTS: 

NONE. 

OUTPUTS: 

02(SP)«SST CODE (SCFLT). 

00(SP)>NUMBER 0^ BYTES TO BE TRANSFERED TO USER STACK (4). 



SFLTRP: 



; TM104 
.-DEFINE UNCONDITIONALLY FOR VECTOR SETUP; TM104 



.IF DF FIILTP 



DIRSVt 

MOV 

BR 

.ENPC 



#S.CFLT.-(SP) 
20t 



;;SAVE REGISTERS AND CLEAR PRIORITY 
SET FOR FLOATING POINT EXCEPTION FAULT 
SET NUMBER OF BVfLS 



TM104 
• •-1 



•♦-IFPPR7-IFPPR8-IFPPRO-FLOATING POINT PROCESSOR EXCEPTION HANDLING 

THESE ROUT'NtS HANDLE EXCEPTION FAULTS FROM THE FLOATING POINT 
PROrfSSOP THE FLOATING POINT EXCEPTION AND ADDRESS REGISTERS AND 
THE lJRRC^ TASK TCB ARE SAVED AND THEN AN ATTEMPT IS MADE TO QUEUE AN 



TM104 
••-1 
rM1Q4 
TM104 
tM104 



••♦• J 5 



*••• 



MArbTt ttllAM 1i.-IVCr-77 3n>n« DAAC J.t 



SSTSR MACRO mi 08 U-DEC-77 20:05 PAGE 2-3 



172 
173 
17A 
175 
176 
177 
178 
179 
180 
181 
182 
183 
184 
185 
186 
187 
188 
189 
190 
191 
192 
193 
194 
195 
196 
197 






AST TO THE TASK AT FORK LEVEL. THESE ROUTINES SUPPORT TWO MODES OF 
OPERATION DEPENDING ON WHETHER THE FPP'S EXCEPTION FAULTS CAN OCCUR 
WHILE THE PROCESSOR IS AT PRIORITY 7 OR NOT. IF THE FPP'S EXCEPTION 
FAULT CAN OCCUR WHILE THE PROCESSOR IS AT PRIORITY /. THEN THE 
PROCESSOR MUST HAVE A PIRQ REGISTER. INITL AND THE NCR SAVE 
COMMAND DETERMINE WHICH MODE OF OPERATION IS TO BE USED OR NOT 
DEPENDING ON WHETHER THE PROCESSOR HAS A PROGRAM INTERRUPT REQUEST 
REGISTER (PIRQ) OR NOT, AND SET UP THE FPP AND PIRQ VECTORS 
ACCORDINGLY. THE ROUTINES OPERATE AS FOLLOWS. 

1. IF THE PROCESSOR DOES NOT HAVE A PIRQ REGISTER THEN THE FPP MUST 
NEVER FAULT WHEN THE PROCESSOR IS AT PRIORITY 7 OR IT MUST BE 
SYNCHRONOUS. IN THIS CASE THE FLOATING POINT EXCEPTION VECTOR 
POINTS TO IFPPR7, AND THE PROCESSOR SIMPLY CALLS INTERR'IPT SAVE 
AND FORK TO GET TO SYSTEM STATE. 

2. IF THE PROCESSOR HAS A PIRQ REGISTER. THE FLOATING POINT EXCEP- 
TION TRAP VECTOR POINTS TO »FPPR8 AND THE PIRQ VECTOR POINTS TO 
SFPPRQ. FLOATING POINT TRAPS ARE CONVERTED TO PIRQ PRIORITY 1 
INTERRUPTS AFTER SAVING THE FLOATING POINT STATUS. ON THE PIRQ 
TRAP AN INT SAVE AND FORK IS USED TO GET TO SYSTEM STATE. NOTE 
THAT THIS STRATEGY WOULD ALSO WORK FOR PROCESSORS DESCRIBED IN 1 
ABOVE. 



INPUTS: 



TM104 
TM104 
TM104 
TM104 
TM104 
TM10A 
TM104 
TNI 04 
TM104 
TM104 
TM104 
TM104 
TM104 
TM104 
TM104 
TM104 
TM10A 
TM104 
TM10A 
TM104 
TM104 
TM104 
TM104 
• •-3 



THE FLOATING POINT EXCEPTION REGISTER CONTAINS THE REASON FOR THE 
FAULT AND THE FLOATING POINT ADDRESS REGISTER CONTAINS THE ADDRESS 
OF THE FAULTING INSTRUCTION. 



OUTPUTS: 



AN ATTEMPT IS MADE TO QUEUE AN AST TO THE TASK CAUSING THE FAULT; TM10A 
WIIH THE CONTENTS OF THE FLOATING POINT EXCEPTION REGISTER AND ; TM104 
AND ADDRESS REGISTER. ) TM104 

.•-2 



.IF DF F$$LPP 



IFPPR7::STST 
BR 

»FPPR8::STST 
BIS 

RTI 

SFPPRQ: :CLR 
US: MOV 
CALL 
MOV 
CALL 
MOV 
MOV 
CALL 
BCS 
MOV 



FLSTS 
US 

FLSTS 
f<2»256.>,PIRQ 



;j;St''»? FLOATING POINT EXCEP AND ADDR 



PIRQ 

ITKTCa.FLTCB 

IINTSV.PRI 

fFLFRK^A.RA 

SFORKO 

^H.FPVA.R* 

FLTCB.RS 

IDASTT 

15t 

FLSTS.A.PRM*c(R1 



» # t 
9 9 9 

• • « 

• • • 
9 9 9 
9 9 t 

• • « 

• * • 

.SE 

;GE 

;D£ 

IF 



STORE FLOATING POINT EXCEP AND AODR 
POST PROGRAMMED INTERRUPT REQUEST 
WAIT FOR PIRQ INTERRUPT 

DISABLE PROGRAM INTERRUPT REOUEST 
MUST SAVE FAULTING TCB NOW 
GO TO PRIORITY 1 
SET ADDRESS OF FORK BLOCK 
CREATE A SYSTEM PROCESS 
T OFFSET TO AST CONTRJL BLOCK IN HEADER 
T TCB ADDRESS OF FAULTING TASK ; TM104 
CLARE FLOATING POINT AST ;**-1 

CS NO AST DECLARED 
INSERT AST PARAMETERS 



TM104 
TM104 
TM104 
TM104 
TM104 
TM104 
TM104 
TM104 
TM104 
TM104 
••24 



••*• K 5 •#•• 



tttta MArftfi mirm ^L~nt^.7T jn-M P*r.y J-i 



SSTSR MACRO Ml 108 U-DEC-77 20:05 PAGE 2-A 



23A 000032 

235 000032 

236 000032 
237 



257 

258 000032 

259 000036 0127A6 

260 000042 000423 



00001 



15$: 



$FPPR7: 
SFPPR8: 
SFPPRQ: 



MOV 
RETURN 

.IFF 



.ENDC 



FLSTS*2,A.PRM(R1) 

f 



DEFINE LABELS FOR SAVE 



TM104 
TM104 
TM104 
TM104 
TM10A 
TM10A 



**-$ILINS-ILLEGAL OR RESERVED INSTRUCTION 

THIS ROUTINE IS TRAPPED TO WHEN AN ILLEGAL OR RESERVED INSTRUCTION 
IS EXECUTED. THE CURRENT MACHINE STATE IS SAVED AND CONTROL IS TRANS- 
FERRED TO THE SST EXIT ROUTINE. 



INPUTS: 



NONE. 



OUTPUTS: 



02(SP)»SST CODE (SCILI). 

OO(SP) 'NUMBER OF BYTES TO BE TRANSFERED TO THE USER STACK (4). 



SILINS::DIRSVS 
MOV 
BR 



#S.C1LI.- 
20$ 



(SP) 



;;SAVE REGISTERS AND SET PRIORITY 

SET FOR ILLEGAL OR RESERVED INSTRUCTION 

SET NUMBER OF BYTES 



Wo 

?85 000052 



767 OOOOOOG 



••-$IOTRP-IOT INSTRUCTION 

THIS ROUTINE IS TRAPPED TO WHEN AN lOT INSTRUCTION IS EXECUTED. IF THE 
STACK DEPTH IS NOT ♦!. THEN THE SYSTEM IS CRASHED VIA A JUMP TO 
$CRASH. ELSE THE CURRENT MACHINE STATE IS SAVED AND CONTROL IS TRANS- 
FERED TO THE SST EXIT ROUTINE. 

INPUTS: 

NONE. 



OUTPUTS: 



IF THE CURRENT STACK DEPTH IS NOT O. THEN THE SYSTEM IS CRASHED. 
ELSE THE FOLLOWING ARGUMENTS ARE SETUP ON THE CURRENT STACK: 



Q2(SP)-SST CODE (SCIOT). 
00(SP)« 



NUMBER OF BYTES TO BE TRANSFERRED TO THE USER STACK <A). 



tIOTRP:.TST tSIKDP 
BLE 50$ 
DIRSV$ 



;RUNNING ON SYSTEM STACK? 
;ir LE YES-FATAL SYSTfM fRROR 
;SAVE REGISTERS AND SET PRIORITY 



tft** I 



*••• 



••TBM HArbn Miina ii..hir.y7 ititM otrs ?-% 



SSTSR MACRO MHOS 1A-DEC-77 20:05 PAGE 2-5 



286 000056 

287 000062 
288 

289 



0127A6 
000A13 



000006 



MOV 
BR 



#S.CIOT,-(SP) 
20S 



;SET FOR lOT INSTRUCTION 
;SET NUMBER OF BYTES 



••-SSGFLT-SEGMENT FAULT 



THIS ROUTINE IS TRAPPED TO WHEN A SEGMENT FAULT OCCURS. THE CURRENT 
MACHINE STATE IS SAVED, SRO THRU SR2 ARE SETUP TO BE PASSED TO THE USER, 
AND CONTROL IS TRANSFERED TO THE SST EXIT ROUTINE. 



INPUTS: 



NUNc • 



OUTPUTS: 



10(SP)*C0NTENTS OF SRO. 

06 (SP) 'CONTENTS OF SR2. 

0«(SP)«CONTENTS OF SRI. 

02(SP)«SST CODE (SCSGF). 

00(SP)«NUMBER OF BYTES TO BE TRANSFERED TO THE USER STACK (10). 



.IF DF MSSMCiE 



SSGFLT: 



:DIRSV» 
MOV 
MOV 
MOV 
MOV 
MOV 
BIC 
MOV 
MOV 
BR 

.ENDC 



«SR0«4,R5 

(R5).-(SP) 

(SP),-(SP) 

-(R5).-(SP> 

-(R5).4(SP) 

#160000. (R5) 

#S.CS6F.-(SP) 

#5*2, -(SP) 

SSTXT 



;;SAVE REGISTERS AND SET PRIORITY 

POINT SR2 

SAVE SR2 

COPY SAVED SR2 

SAVE SRI 

SAVE SRO 

UNFREEZE MEMORY MANAGEMENT UNIT 

SET FOR SEGMENT FAULT 

SET NUMBER OF BYTES 

TAKE COMMON SST EXIT ROUTINE 



••-»TRACE-TRACE (T-flIT) OR BREAK POINT INSTRUCTION (BPT) TRAP 

THIS ROUTINE IS TRAPPED TO WHEN A TRACE TRAP (T-BIT) OCCURS OR A BREAK- 
POINT TRAP INSTRUCTION IS EXECUTED. THE CURRENT MACHINE STATE IS SAVED 
AND CONTROL IS TRANSFERED TO THE SST EXIT ROUTINE. 



INPUTS: 



NONE. 



OUTPUTS: 



02(SP)»SST CODE (SCBPT). 

00{SP):NUMBER OF BYTES VO BE TRANSFERED TO THE USER STACK (A). 



•*•• M 5 **** 



t*Tft» MAran Mlini l/..hcr.77 MtM »ktS 9-A 



SSTSR MACRO Ml 108 U-DEC-77 20:05 PAGE 2-6 



3A3 00006A 

5AA 000070 012746 OOOOOA 

345 000074 000406 

St 



STRACE ; 



.S5 000076 020627 000400 

366 000102 103406 

367 000104 

368 000110 005046 

569 000112 012746 000004 

370 000116 000402 

371 000120 000167 OOOOOOG 
372 



:DIRSVS 
MOV 



#S.CBPT.- 
20$ 



(Sr) 



;;SAVE REGISTERS AND SET PRIORITY 
SET FOR TRACE OR BREAKPOINT TRAP 
SET NUMBER OF BYTES 



**-STRP04-TRAPS AT 4 (ODD ADDRESS, NONEX MEM, ETC.) 

THIS ROUTINE IS TRAPPED TO WHEN A TRAF AT 4 OCCURS. IF A STACK VIOLATION 
HAS CAUSED THE TRAP (I.E. A STACKPOINTER OF LESS THAN 400). THEN THE 
THE SYSTEM IS CRASHED. ELSE THE CURRENT MACHINE STATE IS SAVED AND 
CONTROL IS TRANSFERED TO THE SST EXIT ROUTINE. 



INPUTS: 



NuNc • 



OUTPUTS: 



02(SP)=SST CODE (SCOAD). 

00(SP)<NUMBER OF BYTES TO BE TRANSFERED TO THE USER STACK (4). 



fTRP04::CMP 
BLO 



20S: 



SP.#400 
30i 



30S: 



DIRSVt 




CLR 


-(SP) 


MOV 


#2*2, -CSP) 


BR 


SSTXT 


JMP 


SCRASH 


.DSABL 


LS8 



iSTACK VIOLATION? 

;IF LO YES 

.-SAVE REGISTERS AND SET PRIORITY 
SET FOR ODD ADDRESS TRAP 
SET NUMBER OF BYTES 
TAKE COMMON SST EXIT ROUTINE 
;;CRASH THE SYSTEM 



t* 



••-SSTXT-COMMON SST EXIT ROUTINE 

CONTROL IS TRANSFERED TO THIS ROUTINE TO cFFECT AN SST. IF THE CURRfcNT 
STACK DEPTH IS NOT ZERO, THEN THE SYSTEM IS CRASHED. ELSE AN ATTEMPT IS 
MADE TO EFFECT AN SST FOR THE CURRENT TASK. IF THE TASK DOES NOT HAVE 
AN APPROPRIATE SST VECTOR ENTRY OR A PUSH OF THE SST PARAMETERS ONTO THE 
TASK STACK CANNOT BE EFFECTED. THEN THE TASK IS ABORTED. ELSE THE SST 
IS SETUP AND A DIRECTIVE EXIT IS EXECUTED. 

INPUTS: (MAPPED SYSTEM) 

24(SP)«PS WORD SAVED BY SST TRAP. 

22(SP)«PC WORD SAVED BY SST TRAP. 

20(SP)'SAVED R5. 

16(SP)=SAVtD R4 

U(SP)=SAVED R3. 

12(SP)^SAVfD R2. 

10(SP)=SAVE0 R1. 

06tSP)«SAVED RO. 

04(SP)«SST PARAMETER (ZERO OR MORE PARAMETERS MAY Bf SPECIFIED). 

(SP)=SSI CODE. 

(SP)*NUMBER OF BYTES TO BE TRANSFERED TO USER STACK. 



u 



INPUTS: (REAL MEMORY SYSTEM) 



*••* N ) **** 



SSTSR MACRO M1108 U-DEC-77 20:05 PAGE 2-7 



AOO 

A01 

A02 

A03 

ADA 

A05 

A06 

A07 

A08 

A09 

A10 

All 

A12 

A13 0001 2A 

AH 



1A{SP)=SAVED R3. 

12(SP>«SAVED R2. 

10(SP)=SAVED R1. 

06(SP)sSAVED RO. 

0A(SP)»SSr PARAMETER (ZERO OR MORE PARAMETERS MAY BE SPECIFIED). 

02(SP)=SST CODE. 

CO(SP)«NUMBER OF BYTES TO BE TRANSFERED TO USER STACK. 

OUTPUTS: 

AN ATTEMPT IS MADE TO EFFECT THE SPECIFIED SST FOR THE CURRENT TASK. 



016705 OOOOOOG 



SSTXT: MOV 



Hi 
Ml 



CMP 

BNE 

MOV 

ADD 

MOV 

CMP 

BLO 

CMP 

BIOS 

CMP 

BLO 

CMP 

BLOS 



tHEADR,R5 



.IF DF MSMGE 



f-I.ISTKDP 
7% 

SP.RO 

(SP).RO 

16(R0),R0 

R0,«SDRLM1 

3S 

R0.#SDRLM2 

90t 

R0.«tDQLM1 

Al 

R0.#tDOLM2 

90i 



;GET ADDRESS OF TASK HEADER 



FAULT OCCUR AT STACK DEPTH ZERO? 

IF NE NO 

COPY CURRENT STACK POINTER 

ADD NUMBER OF BYTES TO BE TRANSFERED 

GET FAULT F'C ADDRESS 

FAULT OCCUR IN DIRECTIVE DISPATCHER? 

IF LO NO 

FAULT OCCUR IN DIRECTIVE DISPATCHER? 

IF LOS YES 

FAULT OCCUR IN QIO DIRECTIVE? 

IF LO NO 

FAULT OCCUR IN QIO DIRECTIVE? 



V LOS YES 
REFERENCE LABEL 



.IF DF PttLAS 



AA8 000136 




0CI5767 OOOOOOG 
0(}10A5 
01050A 
06270A 00002? 

127A6 000252' 

'(..7 

OOOOOA 

066663 OOOOOA 



fit 



lOli 



CMP 
BLO 
CMP 
BLOS 

.ENDC 



.IFTF 

Ui 

MOV 

ADD 

CALL 

MOV 

MV 

BEO 

CMP 

BHIS 

ADD 



R0,«IDPLM1 
7$ 

R0.#fDPLM2 
901 



•STKDP 
60t 
R5.RA 
«H.ODVA.RA 

loi 

fSOI.-(SP) 

(RA)«.R9 

201 

A($P). \i 

20% 

A(SP),RS 



; FAULT OCCUR RETRIEVING DEF BLOCK ADDR? 
;1F LO NO 

.'FAULT OCCUR RETRIEVING DEF BLOCK ADDR? 
;IF LOS YES 



.•STACK DEPTH ZERO? 

;1F NE NO - FATAL SYSTEM FRROR 

.-COPY ADDRESS OF HEADER 

.•POINT TO ODT SST VECTOR DESCRIPTOR 

;SST ADDRESS IN OOT VECTOR? 

:SST ADDRESS IN TASK VECTOR? 

.GET ADDRESS OF SST VEC10R 

;I? EQ NO VECTOR THIS DESCRIPTOR 

.•VECTOR LONG ENOUGH TO COVfR SST? 

;|F HIS NO 

.'POINT TO APPROPRIATE VECTOR ENTRY 



•••• I 6 *••• 



SSTSR macro mi 108 U-OEC-77 20:05 PAGE 2-8 



A57 

A58 

459 

A60 

461 

462 

463 

464 

465 000172 

466 

467 

468 

469 000174 

470 000176 

471 000200 

472 000202 

473 000204 
474 

475 
476 
477 
478 
479 
480 
481 
482 
483 

484 000206 

485 000210 

486 000212 

487 000214 
488 

489 
490 
491 
492 
493 
494 
495 
496 
497 
498 
<.9V 
500 
501 
502 
503 
504 
505 

506 000216 

507 000220 

508 000222 

509 000224 
510 

5'1 

513 



.IFT 



011303 



001002 
005724 

005726 
011601 



011500 
160100 
011504 
010015 





MFPI 
MOV 


(R3) 
(SP}*,R3 




.IFF 






MOV 


(R3),R3 




.IFTF 




20S: 
30$: 


RETURN 

TST 

MOV 

.IFT 


30$ 
(R4)* 

(SP)* 
(SP),R1 




MFPI 
SUB 
MOV 
MTPI 


SP 

RI.(SP) 
(SP),R0 
SP 




.IFF 






MOV 


(R5),R0 
R1.R0 
(R5),R4 
R0,(R5) 



012420 
011420 
01032C 
005020 



.IFTF 



,IF DF A$$CHKIM$$MGE 



000226 012601 



CALL 
BCS 


$ACHCK 
70$ 


.ENDC 




.IFT 




CALL 


$REL0M 


IFF 




i 


(R4)*,(R0)* 

(R4),(R0)* 

R3.(R0)* 

(r6)* 


.IFTF 




MOV 


(SP)*,R1 



.-GET ADDRESS OF SST ROUTINE 



;GET ADDRESS OF SST ROUTINE 



IF NE SST ROUTINE FOUND 

POINT TO NEXT VECTOR DESCRIPTOR 

REMOVE RET'JRN ADDRESS 

GET NUMBER OF BYTES TO BE TRANSFERED 



GET CURRENT TASK STACK POINTER 
CALCULATE NEW TOP OF STACK 
COPY NEW TOP OF STACK ADDRESS 
RESTORE NEW TASK STACK POINTER 



GET CURRENT TASK STACK POINTER 
CALCULATE NEW TOP OF STACK 
SAVE CURRENT TASK STACK POINTER 
RESTORE NEW TASK STACK POINTER 



.•ADDRESS CHECK PL'SH ONTO TASK STACK 
.•IF CS ADDRESS CHECK FAILURE 



.'RELOCATE AND MA.' STACK ADDRESS 



MOVE SAVED R4 
MOVE SAVED R5 
SET SST PC WORD 
.SET SST PS WORD 



;GET NUMBER OF BYTES TO TRANSFER 



•••• c 6 **** 



SSTSR l«WCRO M1108 U-DEC-77 20:05 PAGE 2-9 



5U 
515 
516 
517 
518 
519 
520 
521 
522 
523 
52A 
525 
526 
527 
528 
529 
530 
531 
532 
533 
53A 
535 
536 
537 
538 
539 
540 
5A1 
5A2 
5A3 
5A4 
545 
546 
54? 
548 
549 
550 
551 
552 
553 
554 
555 
556 
557 
558 
559 
560 
561 
562 
563 

568 
569 
570 



000230 
000232 
000234 
000236 
000240 
000242 
000244 
000246 



024141 
006201 
005726 
005301 
002402 
012620 
000774 



000246 



000250 



000252 016600 000002 



000256 012706 1777666 



000262 



40S: 



50S: 



TST 
DEC 
BIT 

8* 




-(R1),-{R1> 

R1 

(SP)* 

R1 

501 

(SP)+.(RO)* 

40$ 



«STACK-4,R4 
(R4),(R0)* 
R3,(R4)» 
(R4),(R0) 



ADJUST BY 4 BYTES (PS AND PC WORDS) 

CONVERT TO WORD COUNT 

REMOVE SST CODE FROM STACK 

ANY MORE PARAMETERS TO TRANSFER? 

IF LT NO 

TRANSFER PARAMFTER TO TASK STACK 

REF LABEL 



POINT TO SAVED PC WORD 

SAVE PC AT TRAP ON USER STACK 

SET SST PC WORD 

SAVE PS AT TRAP ON USER STACK 



«CnODE!PMODE,(R4) .-SET SJT PS WORD 



.•EXIT FROM TRAP 



SST FAULT AT NON ZERO STACK DEPTH-FATAL SYSTEM ERROR 



60S: CRASH 



.■CRASH SYSTEM 



SST CANNOT BE EFFECTED BECAUSE OF BAD TASK STACK 

.IF DF AMCHK.'MtSMGE 
70$: MOV «S.CSST,2(SP) ;SET BAD STACK SST ABORT CODE 
.ENDC 

; 

; SST CANNOi BE EFFECTED BECAUSE OF NO SST VECTOR ENTRY 

• 

sot: MOV 2(SP}.R0 .-SET SST ABORT CODE 

• irT 
MOV #SSrACK-22.SP ;RELOAD EXEC STACK POINTS') 

WV #SSTACK-12.SP ;RELOAD EXEC STACK POINTER 

.IFTF 

CALLR SABCTK ; ABORT CURRENT TASK 



.•*<M> •4-lka#_«« «A.Aa AA«e 9— <A 



SSTSR MACRO Ml 108 U-DEC-77 20:05 PAGE 2-10 



57 

57 

57 

57 

57 

57 

57 

578 

579 

580 

581 

582 

583 



FAULT FROM PROTECTED LIMITS IN DRDSP OR DRQIO 



000001 



90$: INC SSTKDP 
DRSTS D.RS98 

.ENIC 

.tm 



; CORRECT STACK DEPTH INDICATOR 
.-SET DIRECTIVE STATUS 



***t I ( •••• 



•ct»B m^r»r\ miiab ii..hcr.77 Jt\>M PACr 9-11 



SSTSR MACRO M110B 
SYMBOL TABLE 



H-DEC-77 «>0:05 PAGE 2-11 



A. AST 

A.BYT 

A.CBL 

A.DQSR 

A.KSR5 

A.NPR 

A.PRM 

CSSORE= 

FE.CAL* 

FE.CEX* 

FE.DR^ = 

FE.EX « 

FE.EX = 

FE.EX = 

FE.LS1« 

FE.MUP« 

FE.MXTs 

FE.NLG* 

FE.PKT" 

FE.PLA* 

HttRTZs 

H.CSP 

H.CUIC 

H.DSW 

H.DUIC 

H.EFLM 

H.EFSV 

H.FCS 

H.FORT 

. ABS. 



000006 
OOOOOA 
000002 
177776 
17777A 
000010 
000012 
OOOAOO 
OOOOAO 
020000 
000010 
000200 
000001 
OOOOOA 
000400 
000002 
OAOOOO 
100000 
000100 
000020 
000074 
000000 
000010 
000OA6 
000012 
000004 
OOOOAO 
000050 
000052 



H.FPSA 

H.FPVA 

H.GARD 

H.HDLN 

H.IPC 

H.IPS 

H.ISP 

H.LUN 

H.NLUN 

M.WtL 

H.ODVA 

H.ODVL 

H.OVLY 

H.PFVA 

H.RCVA 

H.RRVA 

H.SPRI 

H.TKVA 

H.TKVL 

H.VEKT 

H.WND 

LAST 

l.ATTL« 

l.EFN 

I.FCN 

I.IOSB 

I.LGTHs 

I.LNK 

I.LN2 



000042 
00003A 
000072 
000002 
000016 
OOOOU 
000020 
000076 
000074 
000061 
000022 
000024 
000054 
000032 
000036 
000062 
000060 
000026 
000030 
000056 
000044 
000022 
000044 
000003 
000012 
000014 
000044 
000000 
000006 



I.PRI 

I.PRM 

I.TCB 

I.UCB 

KSSCNT- 

KSSCSR- 

KS$IEN- 

K$SLDC= 

K$»TPS= 

(VAR = 

MPCSR >: 

MtSCRB- 

PIRQ = 

PRO = 

PR1 = 

PR4 = 

PR5 = 

PR6 = 

PR7 = 

PS 

RMF11 = 

RS$JP0» 

RttJPIa 

RttJSU 

RSSK11> 

RSSP11* 

R$$X1U 

RS$1in» 

RtSIIS* 



000002 
000024 
000004 
000010 
177546 
177546 
000115 
000001 
000074 
172100 
177746 
000124 
]77772 
000000 
000040 
000200 
000240 
000300 
000340 
177776 
000001 
000000 
000001 
000001 
000001 
000001 
000001 
000000 
000000 



SSTXT 

SUR = 

S$«ECC= 

SWYSZ= 

S.CABO- 

S.CAST= 

S.CBPT= 

S.CCRF* 

S.CEMTs 

S.CFLT= 

S.CILI= 

S.CI0T= 

S.CLRF= 

S.COAD- 

S.CSGF« 

S.CSST= 

S.CTRPs 

S.IOMG- 

S.PRTYs 

TPS « 

T»»A11« 

T»K11« 

Tnj16» 

T»»KMG= 

TStMUs 

T.NCRE* 

T.NCWF* 

T.NDMOs 

T.NDNR=: 



0001 24R 

177570 

000000 

001000 

000024 

000022 

000004 

000030 

000012 

000016 

000010 

000006 

000026 

000000 

000002 

000020 

000014 

000032 

000034 

177564 

000001 

000001 

000001 

000000 

000001 

000006 

000004 

000010 

000000 



177776 
000266 
ERRORS DETECTED: 



000 
001 



VIRTUAL MEMORY USED: 3087 WORDS ( 13 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:18 
C41,20]SSTSR,SYO:C41.30]SSTSR/-SPsCM]EXEMC/ML.C41,103RSXMC,C11,10]SSTSR 

1 



T.NDSE= 

T.NLDNs 

T.NLUP= 

V$$CTR= 

W.BATT 

W.BFPD 

W.BHVR 

W.BLGN 

W.BLPD 

W.BLVR 

W.BNPD 

W.BOFF 

W.BPCB 

W.BSIZ 

»ABCTIC= 

SCRASH- 

$DIRSV> 

SEMSST 

SFLTRP 

SFPPRQ 

$FPPR7 

SFPPR8 

SHEADR' 

SILINS 

$I0TRP 

$STACK= 

ISTKDPs 

STRACE 

STRP04 



000002 

000014 

000016 

000400 

000006 

000014 

000004 

000020 

000016 

000002 

000015 

000012 

000000 

000010 

****** Gx 

****** GX 

****** GX 

OOOOOORG 

000032RG 

000032R6 

000032R6 

000032RG 

****** 6X 

000032RG 

000044RG 

****** GX 

****** GX 

000064RG 

000076RG 



•••* f ^ •«•• 



N < I 



1 




•••• G 6 **** 



cwcm MArun Mima ii..ntr.y7 sn-nA dark 7 



SYSCM MACRO M1108 U-DEC-77 20:06 PAGE 2 



U 000000 

45 000000 

4,6 000000 

47 

4S 

49 



000074 
000115 
000001 
000074 



.TITLE SYSCM 
.IDENT /10/ 



COPYRIGHT (C) 1974, 1978 

DIGITAL EQUIPMENT CORPORATION. MAYNARD. MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 10 

D. N. CUTLER 11-AU6-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
C. A. D'ELIA 
T. J. MILLER 

MODIFIED BY: 

T. J. MILLER 19-JUL-77 

TM095 — DATA STRUCTURES REQUIRED FOR DYNAMIC UMR 
ALLOCATION. 
B. SCHREIBER 28-JUL-77 

BS004 — CHANGE SYSTEM IDENTIMCATION. 

T. J. MILLER 13-SEP-77 

TM101 — REMOVE NULL TASK HEADER, PCB, AND MOST OF TCB 
FOR ELIMINATION OF NULL TASK. 

TM105 — ENHANCED CLOCK SUPPORT. 

SYSTEM COMMON DATA AREA 

MACRO LIBRARY CALLS 



.MCALL HDRDFt,HWDDFI,TCBDF» 



HDRDFS 
HWODFS 
TCBDFI 



MAKE CLOCK PARAMETERS GLOBAL 



S>SRT;»HttRTZ 
SI>IEN->KttIEN 
S»lLDC«>KttLDC 
SIITPS»»KSSTPS 



DEFINE TASK HEADER OFFSETS 

DEFINE HARDWARE REGISTERS 

DEFINE TASK CONTROL BLOCK OFFSETS 



;l INF FREQUENCY 

:i .ABLE BITS PATTERN 

.'LOAD VALUE FOR COUNT REGISTER 

; TICKS PER SECOND ON P CLOCK 



TM105 

TM103 

TM103 

TM10' 

TM10 

IMIO 

TM10 

TM1Q 

TM10 



•••* H 6 •••• 



«v«ri 



HArnn MIIOR U-DFC-77 ?Q-.Qt> PACE ?-1 



SYSCH WCRO mi08 U-OEC-77 20:06 PAGE 2-1 



000000 



: LOCAL SYMBOL DEFINITIONS 
'; FUNCTION MASK LITERAL 

• 

FMASK= 



.'INITIALIZE FUNCTION MASK 



.IF DF ntSEXTMSSI>K)E 
FMASK» FMASKiFE.EXT .-INCLUDE EXTENDED MEnORV MASK 

.ENDC 



.IF DF nSSMUP 
FNASK' FMASKiFE.MUP 
.ENOC 

.IF DF RSIEXV 
FMASK* FMASK!FE.EXV 
.ENOC 

.IF DF LSSDRV 
FNASM FMASK !FE. DRV 
.ENOC 

.IF DF MtLAS 
FMASK* FMASK IFE.PLA 
.ENOC 

.IF DF OWOPT 
FMASK- FMASKIFE.PKT 
.ENOC 



: INCLUDE MULTI-USER PROTECTION MASK 



; INCLUDE EXTENDED VIRT ADDR MASK 



;PLAS SUPPORT 



;QIO PACKET PREALLOCATION 



,IF DF CtSCKPIDItYNC 
FMASK* FMASK .'FE.CAL ; DYNAMIC CHECKPOINT SPACE ALLOCATION 

.ENOC 



t*** I 6 •••• 



•«*Mi MArDo Miirui ix..ntr.77 7n>f)A pact 90 



SYSCM MACRO Ml 108 U-DEC-77 20:06 PAGE 2-2 



.IF DF ESSXPRtnSSMGEtDSSYNM 
FMASK= FMASKiFE.EXP ;EXTFNO TASK DIRECTIVE 

.ENOC 



.•PROCESSOR IS AN LSI-11 



137 000000 




138 000000 


OOOCOO 


139 000002 




UO 000002 


000 


HI 000003 


000 


1A2 OOOOOA 


000000 


U3 000006 


000000 


U* 000010 


062 


000013 040 




U5 OOOOU 


000000 


U6 000016 


000000 


U7 000020 


1775A6 


U8 000022 


1775A6 


U9 




Ir2 

153 00002A 


000000 



161 

162 000026 

163 



.IF OF L»fSI1 
FMASK- FNASKiFE.LSI 
.ENDC 

; NULL TASK CONTROL BLOCK 

; THIS TCB TERMINATES THE SYSTEM AND ACTIVE TASK LISTS. IT MUST HAVE 
; A PRIORITY OF ZERO AND ALWAYS BE BLOCKED. REQUIRED POSITIONS ARE 
. ENFORCED BY THE "ASSUME" MACRO. 



BEGINNING OF SVSCM AREA FOR CDA 
T.LNK -POINTER TO CURRENT TASK HEADER 
T.PRI MUST BE ZERO 
T.PRI-NULL TASK PRIORITY IS ZERO 
T. IOC-CURRENT TASK PRIORITY 
T.TCB-COMMON EVENT FLAGS 1-16 
T.NAM-COMMON EVENT FLAGS 17-32 
T.NAM»2.T.RCVL-SYSTEM IDENTIFICATION 

T.RCVL»2-P01NTER TO TKTN TCB 
T.ASTL-POINTER TO SHUFFLER TCB 
T.ASTL*2-ADDRESS OF CLOCK COUNT REG 
T.EFLG-ADDR OF CLOCK CNTRL STATUS REG 



SCMBEG: 


J 




SHE ADR: 


:.yORD 







ASSUME 


.-SHE ADR, T.PRI 




.BYTE 





$CURPf;: 


:.BYTE 





SCOMEF: 


:.WORD 







.WORD 






062 OAO SSYSID::. ASCII /22 / 

STKNPT::.WORD 

SSHFPT::.U0RD 

SCKCNT::.WORD KSSCNT 

SCKCSR::.WORD KSSCSR 



.IF EQ KSSCSR-177SA6 
SCKLDC::.WORD 

.IFF 
SCKLDC::.WORD KSSLDC 

.ENDC 

SSVUIC:: 

.IF OF MSSMGE 
.BYTE 54.1 
.IFF 



{T.EFLG»2-CL0CK LOAD COUNT 



;T.EFLG»2-CL0CK LOAD COUNT 



TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
;**-152 

; TM101 

; TM101 

; 1M101 
.••-1 

; BSOOA 

.•♦•-1 
; TM101 
;*-1 

(M103 
TM103 
TM103 
TM103 
TM103 
TM103 
TM105 
TM103 
TM103 
TM103 
TM103 
TM105 
TM103 



;T.UCB-OE FAULT MAPPED SYSTEM UlC 



••*• J 6 **** 



■ ••■rH M*M>n MliAB 1i.-l\Er.99 trX.nA. BARC }.t 



SYSCN MACRO Ml 108 U-OEC-77 20:06 PAGE 2-3 



171 000026 

172 

173 

17A 

175 

176 000030 

177 

178 

179 

180 

181 000030 

182 

183 

184 

185 

186 000030 

187 000032 

188 000032 

189 000034 

190 000036 

191 000040 

192 000042 

193 000044 

194 000046 

195 000050 

196 000052 

197 000052 
198 

199 
200 
201 
202 

203 000054 

204 000056 

205 000060 

206 000062 

207 000064 

208 000066 

209 000070 

210 P00072 

211 000074 
212 

213 

214 000102 

215 000104 

216 000106 

217 000110 
^8 



?6 000112 
i2? 



050 



000000 

OOOOOOG 

000001 

000000 

000000 

000000 

000000 

000003 

OOOOOOG 

000000 



000000* 

000000 

000000' 

000000' 

000000 

OOOOOOG 

000000 

000000 

000000 



n7777 
000000 
000104' 
000000 



000000 



001 



.BYTE 
.ENDC 



50,1 



;T.UCB-DEFAULT UNMAPPED SYSTEM UIC 



ASSUME .-SHEAOR.T.TCBL .'T.TCBL MUST BE ZERO 



,IF NDF ESSDVCtESSNSltEMDVC 



$ERRSQ: 



SEXSIZ 
SPWRFL 
$S1GFL 
SLOGHD 
SMCRCB 
SLSTLK 

SCRAVL : 



.ENDC 



.WORD 

ASSUME 

:.WORD 

:.WOftD 

:.WORD 

:.WORD 

:.WORD 

:.WORD 

.WORD 

:.WORD 

ASSUME 

.WORD 



.-ERROR SEQ » ALWAYS ZERO IF NO LOGGING 



;T.TCBL-LIN>C TO NEXT TCB 



-»HEADR. T.STAT ; T.STAT MUST BE NONZERO 



ISYTOP 

1 









3 

SSYBE6 



;T.STAT-ADDR OF LAST BYTE IN EXEC 
;T.ST2-P0WERFA]L RECOVERY REQUEST FLAG 
;T.ST3-TAS(C WAITING FOR SIG EVENT 
;T.NRPC-L061CAl DEVICE ASSIGNMENT LIST 
;T.LBN*1-MCR COHMAHD BLOCK ADDRESS 
:T.LDV-LOCK WORD (TCB ADDRESS OF OWNER) 
;T.PCfa-CONSTANT FOR ALLOCATION ROUTINES 
;T.MXSZ-ACTIVE TASK LIST LISTHEAD 



-$HEADR,T.ACTL ;T.ACTL MUST BE ZERO 



;T.ACTL-NEXT ACTIVE TASK-DUMMY BLK SIZE 



END OF SUPERIMPOSED AREA-REMAINING SYSTEM COMMON AREA 



tACTHD 


:.WORD 


tHEADR 


SARTIM 


.-.WORD 





$TKTCB 


.-.WORD 


SNEADR 


SRQSCH 


:.WORD 


SHEADR 


ISTKDP 


.-.WORD 





tDEVHD 


:.WORD 


SDEVTB 


SMCRPT 


:.WORD 





tERRPT 


r.WORD 





ICFLPT 


:.WORD 







.BLKW 


1 




.BLKW 


1 


IINTCT 


:.WORD 


-1 


SFRKHD 


.-.WORD 







.WORD 


SFRKHD 


IF MASK 


:.WORD 


FMASK 




.IF DF 


PttRTY 


IPARPT : 


.-.WORD 


tPARTB 


tPARPT: 


.-.WORD 






.•ACTIVE TASK LIST LISTHEAD 

; ABSOLUTE TIME COUNTER 

; POINTER TO CURRENT TASK TCB 

; SCHEDULE REQUEST TCB ADDRESS 

.•STACK DEPTH INDICATOR 

;POINTER TO FIRST DEVICE CONTROL BLOCK 

;POINTER TO MCR TCB 

.•POINTER TO ER-^OR LOGGER TCB 

.•POINTER TO FIRST CHECKPOINT FILE PCB 

.CLOCK INTERRUPT FORK BLOCK LINK 

; CLOCK INTERRUPT FORK BLOCK PC 

;CLOCK INTERRUPT TICKS COUNT 

.•FORK QUEUE LISTHEAD 

;(LAST POINTS TO FIRST INITIALLY) 

.'SYSTEM FEATURE MASK 



;PARITY ADDRESS VECTOR TABLE POINTKH 
.'PARITY ADDRESS VECTOR TABLE POINTER 



TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 

TM101 
TM101 
TM101 
TM101 
:*»-3 



TM101 
TM101 
TM101 
1M101 



.'•*-3 



TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM1Q1 
TM101 
TM101 
TM101 
TM101 
TM101 
TMIQI 
TM101 
TM101 



•••• K 6 *•*« 



«wefM MAfftn liiiftM i/.-hrr-yy jn-fWk PAr.P ?-a 



SYSCH MACRO Ml 108 U-DEC-77 20:06 



231 0001 U 000000 

232 000116 OOOOOOG 



A1 
2A2 

2A3 000120 
2A4 000122 
245 0001 2A 
2A6 
2A7 



000000 
000000 
000000' 



250 000126 000 

251 000127 000 

252 000130 007760 
53 



258 000132 

259 0001 3A 

260 000136 

261 OOOUO 

262 000U2 

263 000U4 



269 000U6 

270 000150 

271 000152 

272 0001 5A 
275 000156 
Z7k 000160 

275 000162 

276 0001 6A 
Vl 000166 

278 000170 

279 000172 
?80 000174 
Ml 000176 

m 000204 



035 
037 
037 
OAO 
OAO 
OAO 



000001 

000002 

000004 

000010 

000020 

OOOOAO 

000100 

000200 

000400 

001000 

002000 

004000 

OK ; 

02000 

04C 

100060 



040 
040 
040 
037 
037 
040 



PAGE 2-4 


.ENDC 






TM101 
TM101 
TM101 


SCLKHD: 


:.WORD 





; CLOCK QUEUE \ 


TM101 


SCOPT:: 


.WORD 


.COO 


; POINTER TO COMMAND OUTPUT UCB 


TM101 
TM101 
TM101 




.IF NDF 


L$SLDRKRSS11S 




TM101 
TM101 


SPARHD: 


:.UORD 


SPCBS 


.•POINTER TO PARTITION LIST \ 


TM101 


SLDRPT: 


.-.WORD 


.LDR 


.•POINTER TO LOADER TCB 


TM101 


STSKHD: 


.-.WORD 
.IFF 


SSTD 


.•POINTER TO SYSTEM TASK DIRECTORY 


TM101 
TM101 
TM101 
TM101 


SPARHD: 


:.WORD 





.•POINTER TO PARTITION LIST 


TM101 


SLORPT: 


:.WORD 





; POINTER TO LOADER TCB 


TM101 


»TSKHD: 


:.yORD 
.ENDC 


SHEADR 


.•POINTER TO SYSTEM TASK DIRECTORY 


■ TM101 
TM101 
TM101 

• TM101 
TM101 


SIDLCT: 


:.8YTE 





;IDLE PATTERN COUNT BYTE 


• TM101 


SIDLFL: 


: .BYTE 





;IDLE PATTERN FLAG BYTE 


• TM101 


SIDLPT: 


:.WORD 


7760 


.•IDLE PATTERN WORD 


TM101 
TM101 


» 








1M101 


; DAYS 


PER MONTH TABLE (ENTRY 


CONTAINS DAYS PER MONTH t 1) 


• TM101 


• 








• TM101 
TM101 


tOYPMN: 


:.BYT£ 


29.. 32. 


; FEBRUARY. MARCH 


• TM101 




.BYTE 


31.. 32. 


.•APRIL. MAY 


• TM101 




• BYTE 


31.. 32. 


;JUNE. JULY 


• TM101 




.BYTE 


32. .31. 


.•AUGUST, SEPTEMBER 


• TM101 




.BYTE 


32. .31. 


.•OCTOBER. NOVEMBER 


TM101 




.BYTE 


32., 32. 


.'DECEMBER. JANUARY 


• TM101 

• TM101 



; BIT MASK TABLE 



S8TMSK::.W0RD 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 



20000 
40000 
100000 



BIT 
BIT 1 
BIT 2 
BIT 3 



BIT 
BIT 5 
BIT 6 
BIT 7 
BIT 8 
BIT 



BIT 10 
BIT 1 
BIT 
BIT 

BIT 14 
BIT 15 



W 



•••• [, A **«« 



I ftMftfM 



MAfBA Mima ii._ncr.97 SAifu. DAnc im\ 



SYSCH MACRO Ml 108 U-DEC-77 20:06 PAGE 2-5 



307 

308 000206 



001000 



317 

318 000220 

319 000222 

320 00022A 

321 000226 

322 000230 

323 000232 
324 



i 



\77777 
000015 
000040 
000030 
000074 
000074 



000234 0000^4 



341 000236 000112 



ONLINE ERROR LOGGING DATA BASE 



.IF DF E$SDVC!ESSNSI 



SERRHD 


:.WOR0 







.WORD 


.-2 


SERRLM 


r.WORD 


512 


SERRSQ 


:.WORD 





SERRSV 


:.W0RD 





SERRSZ 


.-.WORD 





SIOABM 


:.W0RD 






ERROR LOGGING MESSAGE QUEUE LISTHEAD 

LIMIT ON RESIDENT ERROR LOGGING DATA 
UNIVERSAL ERROR SEQUENCE NUMBER 
POINTER TO ERROR FILE IDENTIFICATION 
RESIDENT BYTES OF ERROR LOGGING DATA 
DEVICE I/O ACTIVE BITMAP 



.ENCC 



SYSTEM BOOTSTRAP AND SAVE CONFlGURATIOfJ VECTOR 



SSVSIZ: 



.WORD 
.BLKB 
.BLKB 
.BIKW 
.BLKW 



SSSYSZ 

1 

3 

1 
1 



TIME LIMIT PARAMETERS 



.WORD 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 



-1 

13. 

32. 

24. 

60. 

60. 



iJiLt QF MEMORY IN 32W BLOCKS 
.■PHYSICAL UNIT NUMBER OF LOAD DEVICE 
;LBN OF LOAD/SAVE IMAGE ON DISK 
;NAME OF LOAD DEVICE IN ASCII 
.-SIZE OF LOAD IMAGE IN 256W BLOCKS 



.•YEARS PER UNIVERSE 

;MONTHS PER YEAR 

.-DAYS PER MONTH (CALCULATED) 

.-HOURS PER DAY 

.-MINUTES PER HOUR 

.-SECONDS PER MINUTE 



.IF EQ KllCSR-1 77546 
STKPS:: .WORD HSSRTZ ; TICKS PER SECOND 

.IFF 
$TKPS:: .WORD KISTPS ;TIClkS PER SECOND 

.INDC 



; CURRENT TIME VECTOR 
i 

.WORD 74. 



.•YEAR OF UNIVERSE 



TM103 
TM103 
TM103 
TM1Q 
TMIO 
TM103 
TM103 
TM103 
rM103 
TM105 
TM105 
TM105 
• •-1 



•t** M 4 •«** 



CM»rM MArbA mirui 1i..rttr.T7 MtfUk DAr.C 9-A 



SYSCM MACRO Ml 108 lA-DEC-77 20:06 PAGE 2-6 



3A2 0002A0 
3A3 0002A2 
3AA 0002AA 
3A5 0002A6 
3<i6 000250 
3A7 000252 
8 



OOOOOA 
000035 
000000 
000000 
000000 
000000 



362 000254 

363 000254 
364 



STTNS:: 


.WORD 
.WORD 
.WORD 
.WORD 
.WORD 
.iMRD 


4 

29. 










; LIFO 


SEND AND 


I/O PR 




.IF OF 


QSSOPT 


SPICAVL: 
SPKNUM: 
SPKMAX: 


;.WORD 
:.BVTE 
:.8YTE 

.IFF 




QSSOPT 


SPKNUM: 
SPKMAX: 


; 





.•MONTH OF VEAR 
;DAY OF MONTH 
;HOUR OF DAY 
.'MINUTE OF HOUR 
.•SECOND OF MINUTE 
.■TICK OF SECOND 



.•POINTER TO FIRST PACKET IN LIST 
;NUMBER OF PACKETS CURRENTLY IN LIST 
jMAXIMUM NUMBER ALLOWED IN LIST 



;REF LABEL FOR MCR 
;REF LABEL FOR MCR 



.ENDC 



379 000254 



GLOBAL TASK SI2E LIMIT FOR EXTEND TASK DIRECTIVE 

.IF DF ESSXPRIMSSMGE&DSSYNM 
SMXEXT::.WORD U7777 ;IN1TIALIZE TO MO LIMIT 

.IFF 
SMXEXT:: ;REF LABEL 

.ENDC 



UMR ALLOCATION LISTHEAD AND WAIT QUEUE USTNEAD. THE ALLOCATION 
LISTKEAO DOUBLES AS A DESCRIPTOR OF THE UMR'S STATICLY ALLOCATED TO 
THE EXEC AND ANYONE ELSE. 



.IF DF MSSEXT 

SUMRHD::.WORD 

.WORD U6MPR 

.WORD NSSIJMR 

SUMRWT::,WOflD 0..-2 

.ENDC 



;MAPP1NG ASSIGNMENT BLOCK LISTHEAD 
;AD0RE5S or flRST ASSIGNED UMR 
.•NUMBER or UMR'S STATICLY ASSIGNFO ♦ 4 
;UMR WAIT QUEUE LISTHEAD 



TM095 

TM095 

TM095 

TM095 

TM095 

TM0<'5 

TMQ9 

IM09 

TM095 

TM095 

TM095 

TMOOS 
TM095 
TM095 



•••• M 5 ••«« 



SYSCM MACRO MllOB U-DEC-77 20:06 PAGE 2-7 



399 

AOO 

A01 00025A 

A02 000001 



SCMEND: 



.END 



;END OF SYSCM AREA FOR CDA 



TM095 
TM095 
TM095 



•••• I y •«•• 



SYSCM 


MACRO mi 08 U-DEC-77 20:06 PAGE 2-8 


SYIBOL 


TABLE 








C»SORE= 


OOOAOO 


H.TKVL 


000030 


TS.NRP= 


FE.CAL= 


000040 


H.VEXT 


000056 


TS.0UT= 


FE.CEX= 


020000 


H.WND 


000044 


TS.RDN= 


FE.0RV= 


000010 


IC$$CNT= 


177546 


TS.RUN= 


FE.EXP= 


000200 


K$$CSR= 


177546 


T$»Ar = 


FE.EXT= 


000001 


K$$IEN= 


000115 


T$SC11= 


FE.EXV= 


OOOOOA 


Kf$LDC= 


000001 


T»$J16« 


FE.LSI= 


000400 


K$»TPS= 


000074 


TSSKMGs 


FE.I*JP= 


000002 


MPAR = 


172100 


TSW11 = 


FE.MXTs 


OAOOOO 


MPCSR = 


177746 


T.ACTL 


FE.NLG= 


100000 


nSSCRBs 


000124 


T.ASTL 


FE.PKT= 


000100 


PIRQ = 


y77772 


T.ATT 


FE.PLA= 


000020 


PRO = 


000000 


T.G CB 


FHASK = 


000000 


PR1 = 


000040 


T.DPRI 


H»$RTZ= 


000074 


PR4 = 


000200 


T.EFL6 


H.CSP 


000000 


PR5 = 


000240 


T.IOC 


H.CUIC 


000010 


PR6 = 


000300 


T.LBN 


H.DSU 


000046 


PR7 - 


000340 


T.LDV 


H.DUIC 


000012 


PS 


177776 


T.LNK 


H.EFLM 


000004 


R$$F11= 


000001 


T.MXSZ 


H.EFSV 


000040 


RStJPO^ 


000000 


T.NAM 


H.FCS 


000050 


R$»JP1= 


000001 


T.OFF 


H.FORT 


000052 


R$SJSN 


000001 


T.PCB 


H.FPSA 


000042 


RSSKIU 


000001 


T.PRI 


H.FPVA 


000054 


R»$P11« 


000001 


T.RCVL 


H.GARD 


000072 


RSSXils 


000001 


T.RRFL 


H.HOLN 


000002 


R»$11«x 


000000 


T.SRCT 


H.IPC 


000016 


R»»11S» 


000000 


T.STAT 


H.IPS 


000014 


SWR > 


177570 


T.ST2 


H.ISP 


000020 


SMECC« 


000000 


T.ST3 


H.LUN 


000076 


StSIEN> 


000115 G 


T.TCBL 


H NLUN 


000074 


StSLDC> 


000001 G 


T.UCB 


H.NML 


000061 


SfSRTZ" 


000074 6 


T2.AB0: 


M.OOVA 


000022 


Sf$TPS» 


000074 G 


T2.AST" 


H.OOVL 


000024 


suvs:* 


001000 


T2.BFX> 


H.OVLY 


000054 


TPS » 


177564 


T2.CAF* 


H.PFVA 


000032 


TS.BU= 


170700 


T2.CHIC = 


H.RCVA 


000036 


TS.CKP* 


000200 


T2.CICD- 


H.RRVA 


000062 


TS,CKR« 


000100 


T2.DST= 


H.SPfl 


000060 


TS.EKE* 


100000 


T2.FK0= 


H.TKVA 


000026 


rs.nsG* 


020000 


T2.HLTX 


. ABS. 


000102 000 
000254 001 








ERRORS DETECTED: 









010000 


T2.SPN= 


00040(1 


T2.STP= 


04000(' 


T2.TI0= 


004001 ' 


T2.WFR= 


00000 


T3.ACP= 


00000 


T3.CAL= 


00000 


T3.CL1= 


000001 1 


T3.NCR= 


00000 


T3.NET= 


000052 


T3.NS0= 


000016 


T3.PH0X 


000054 


T3.PRV= 


000004 


T3.RER= 


000040 


T3.R0V= 


000022 


T3.RST= 


000003 


T3.SLV= 


000041 


VSSCTRe 


000044 


W.6ATT 


000000 


W.BFPD 


000050 


W.BHVR 


000006 


W.BLGH 


000060 


W.BLPD 


000046 


W.BLVR 


000002 


W.BNPD 


000012 


W.BOFF 


000064 


W.BPCB 


000063 


U.BSIZ 


000032 


SABTin 


000034 


SACTHD 


000036 


SBTMSK 


000030 


»CFLPT 


000026 


tCKCNT 


000100 


SCKCSR 


100000 


SCKLOC 


004000 


tCLKHD 


000400 


tCMBEG 


020000 


tCMEND 


010000 


ICOMEF 


040000 


»C0PT 


00?000 


ICflAVL 


000200 





VIRTUAL mmKf USED: 3553 WORDS ( 14 PAGES) 
DYNAMIC HEWRY: r57^/, UORDS ( 60 PAGES) 
ELAPSED TldE: 00 .•00:1'' 
t41.20]SYSC«,S*0:C41.303SYSCM/-SP.C1.1JEX£«C/ML.[41,10JRSX«C.t11.10]SYbC« 



000004 

000020 

001000 

000001 

100000 

000100 

001000 

004000 

000020 

0002C0 

040000 

010000 

020000 

000040 

000400 

002000 

000400 

000006 

000014 

000004 

000020 

000016 

000002 

000015 

000012 

000000 

000010 

00O056RG 

000054R6 

0001 46RG 

000074RG 

000020RG 

000022RG 

000024RG 

0001 14RG 

OOOOOORG 

000254RG 

000004RG 

0001 16RG 

000050RG 



SCURPR 

SDEVHD 

$DEVTB= 

SDYPMN 

SERRPT 

SERRSQ 

SEXSIZ 

SFMASK 

SFRKHD 

SHEADR 

SIDLCT 

»IDLFL 

$IDLPT 

SINTCT 

ILDRPT 

SLOGHD 

SLSTLK 

MCRCB 

WCRPT 

SnXEXT 

SPARHD 

SPARPT 

SPKNAX 

SPKNUM 

SPWRFL 

SROfiCH 

ISMFPT 

SSIGFL 

ISTKDP 

tSYBEGs 

fSYSID 

SSYSIZ 

ISYTOP= 

SSYUIC 

STKNPT 

ITKPS 

STKTCB 

STSKHD 

STTNS 

.COO = 



000003RG 
000066RG 
****** GX 

0001 32RG 
000072RG 
000030RG 
000032RG 
00011 ORG 
0001 04RG 
OOOOOORG 
0001 26RG 
0001 27RG 
0001 30RG 
0001 02RG 
0001 22RC 
000040RG 
000044RG 
000042RG 
000070RG 
000254RG 
0001 20RG 
0001 12RG 
000254RG 
000254RG 
000034RG 
000062RG 
00001 6RG 
000036RG 
000064RG 
****** GX 

00001 ORG 
000206RG 

****** GX 

000026RG 
00001 4RG 
0002 34RG 
000060RG 
0001 24RG 
C00252RG 
****** GX 



•••• C 7 •••• 



rr- 



"I 




•*•• I) J •••• 



rTTT 



SYSOF MACRO H1 108 U-OEC-77 20:06 PAGE 1 



1 
2 
3 

5 
6 
7 
8 

9 
10 
11 
12 
13 
U 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 

26 000000 

27 000000 

28 OOOAOO 

29 001000 

30 00007A 

31 1775A6 

32 1775*6 

33 00007* 

34 000001 

35 000115 

36 000001 

37 000000 

38 000001 

39 000001 

40 000001 

41 000001 

42 000001 

43 000001 

44 000001 

45 000001 

46 000001 

47 000000 

48 000400 

49 000124 

50 000000 



.IIF NDF SSSYDF 
•TITLE RSXHC 
.IDENT /W.I/ 



•NLIST 



COPYRIGHT (C) 1976. 1977 

DIGITAL EQUIPMENT CORPORATION. NAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNOEH A LICENSE FOR USE ONLY ON A 
SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE 
INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE. OR 
ANY OTHER COPIES THEREOF. MAY NOT BE PROVIDED OR OTHERWISE 
MADE AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH 
SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE 
TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN 
IN DEC. 

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY 
ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. 



; VERSION M3.1 

RS$11S>0 

TSSKM6*0 

C$t0RE'256. 

SSSYSZs16.*32. 

H$SRrZ>60. 

Kt$CSR> 177546 

K$SCNT=1 77546 

KttTPS>60. 

Kt$LDC«1 

K»IEN«115 

TWAILI 

RStJPO'O 

RttJPI'1 

RflF11«1 

RSIK11«1 

RISP11>1 

RtlJSI'1 

TI$C11»1 

RttXll'1 

TIIJ16^1 

TMM11«1 

SItECC-O 

VtlCTR-400 

MtlCRe>84. 

RSt11M«0 

; EXEC MACROS 



;RSX-11S SYSTEM 

.'TASK TERM. /DEVICE NOT READY MESSAGES 

;SIZE OF DYNAMIC STORAGE REGION 

.SIZE OF PHYS. MEMORY IN 32W BLOCKS 

.-LINE FREQUENCY 

.-LINE CLOCK CSR ADDRESS 

.-COUNT REGISTER ADDRESS 

.•TICKS PER SECOND 

.'LOAD COUNT VALUE 

.CLOCK INTERRUPT ENABLE (KW11-P AT LINE FREQ) 

.'TA11 DUAL CASSETTES 

.'OFFSET RECOVERY SUPPORT 

.'RJ/RWP04-05-06 DISK PACK CONTROLLERS 

;RF11 FIXED HEAD DISK CONTROLLERS 

.'RK11 CARTRIDGE DISK CONTROLLERS 

.'RP11-C/E DISK PACK CONTROLLERS 

;RJ/RWS03-04 DISK CONTROLLERS 

.'TC11 DECTAPE CONTROLLERS 

;RX11 DISK CONTROLLERS 

.•TJ/TWU16-45 MAGTAPE CONTROLLERS 

;TM/TMA/TMB11 MAGTAPE CONTROLLERS 

.'SHARED EXECUTIVE ECC CODE 

.'ADDRESS OF HIGHEST VECTOR PLUS 4 

.'MCR COMMAND BUFFER LENGTH 

;RSX-11M SYSTEM 



ASSUME MACRO FOR CHECKING ADJACENCY AND OFFSET VALUE ASSUMPTIONS 



.MACRO ASSUME A.B<G 



•#•• I 7 ttt* 



ii*ran mirf 1i.-t\tr-T7 JO.fU ttkrx 1-1 



RSXnC MACRO mi 08 



58 

59 

60 

61 

62 

63 

6A 

65 

66 

67 

68 

69 

70 

71 

72 

73 

7A 

75 

76 

77 

78 

79 

80 

81 

82 

83 

84 

85 

86 

87 

88 

89 

90 

91 

92 

93 

94 

95 

96 

97 

98 

99 

100 

101 

102 

103 

104 

103 

106 

107 

108 

109 

110 

111 

112 

113 

1U 



PAGE 1-1 








.IF NE 


A-a 




.ERROR 


:EXPRESSION(S} NOT EQUAL 




.ENDC 






.ENDM 






CALL 


SUBROUTINE 




.MACRO 


CALL SUBR ARC 




.IF IDN <$INTSV>.<SUBR> i 




JSR 


R5,SINTSV 




.IF OF 


Lsssn 




.WORD 


ARG 




.IFF 






.WORD 


*C<ARG>tPR7 




.ENDC 






.IFF 






.IF IDN 


<$SAVNR>,<SUBR> 




JSR 


R5.$SAVNR 




.IFF 






.IF IDN <SSWSrK>,<SUBR> 1 




EMT 


376 




.WORD 


ARG 




.IFF 






JSR 


PC. SUBR 




.ENDC 






.ENDC 






.ENDC 






.ENDM 






CALL 


AND RETURN FROM SUBROUTINE 



.MACRO CALLR SU8R 
JMP SUBR 
.ENDM 



CRASH SYSTEM 



.MACRO CRASH 

lOT 

.ENDM 



DIRECTIVE REGISTER SAVE AND SET PRIORITY 



.MACRO DlRSVt 
JSR RS.tDIRSV 
.ENDM 



; SET DIRECTIVE STATUS 

•••• f f •••• 



Bcwnr MArbn mina 1i,.nBr.77 3n*nA OkCJ 1«9 



RSXMC MACRO M1108 U-OEC-77 20:06 PAGE 1-2 



.MACRO DRSTS VALUE 
TRAP VALUE 
.ENDM 



GENERATE INTERRUPT ROUTINE ENTRY POINT LABEL 



.IF DF ESSDVC 
.MACRO INTLB NUM.NAM 
S'NAM'NUM'T:: 
.ENDM 
.ENOC 



INTERRUPT SAVE GENERATION MACRO FOR ERROR LOGGING DEVICES 



.MACRO INTSES DEV,PRI,NCTRLR,PSWSV.UCBSV.?LAB 

.IF DF LSSDRV t LDS'DEV I MtSMGE 
••DEV'INT:: 

.IF NDF EtSDVC 

.IF EQ NCTRLR-1 

CLR M 

.ENDC 

.ENDC 

.IFF 

.IF NDF EtIDVC 
S'DEV INT : : INTSVS DEV.PRI .NCTRLR.PSWSV.UCBSV 

.IF EO NCTRLR-1 

CLR M 

.ENDC 

.MEXIT 

.IFf 
StS'O 

.REPT NCTRLR 

INTLB VSSS.DEV 

JSR R5.SINTSE 

SCBLB Mtt.DEV 

,IF DF LISSI1 

.WORD PRI 

.IFF 

.WORD •C<PRI>IPR7 

.ENDC 

.IF 6T NCTRLR-IM-1 

BR LAB 

.ENDC 
ttl>t»S«1 

.ENDR 
LAB: 

.ENDC 

.ENDC 

GTUCBI UCBSV, NCTRLR 



•••• 6 7 *••* 



BM#Mr uArbn mirvD i/._Mr_77 sn.nA OAr.C 1-t 



RSyWC MACRO mi08 U-DEC-77 20:06 PAGE 1-3 



.ENDM 



INTERRUPT SAVE GENERATION FOR NON-ERROR LOGGING DEVICES 



.MACRO INTSVS 
.IF NDF LSSDRV 



DEV.PRl ,NCTRLR.PSWSV,UCBSV 
! mSMGE ! LDt'OEV 



.IF 6T 


NCTRLR-1 


.IF B 


<PSWSV> 


MFPS 


TEMP 


.IFF 




NFPS 


PSWSV 


.ENOC 




.IFTF 




JSR 


R5,$INTSV 


.IF OF 


Ltssn 


.WORD 


PRI 


.IFF 




.yORD 


•C<PRI>IPR7 


.ENDC 




.IFT 




.IF B 


<PSWSV> 


MOV 


TEMP.R4 


.IFF 




MOV 


PSWSV, R4 


.ENOC 




BIC 


#1 77760. R4 


ASL 


M 


.ENDC 




.ENDC 




GTUCBS 


UCBSV.NCTRLR 


.ENDM 





GENERATE CODE TO LOAD UCB ADDRESS INTO R5 
ONLY BY INTSEt AND INTSVS 



CALLED 



.MACRO 


GTUCBS UCBSV.NCTRLR 


.IF m 


<UCBSV> 


.IF GT 


NCTRLR-1 


MOV 


UCBSV(R4).R5 


.IFF 




MOV 


UCBSV,R5 


.ENDC 




.IFF 




.IF GT 


NCTRLR-1 


MOV 


CNTBL(R*).R5 


• IFF 




MOV 


cntbl.r; 


.ENOC 




.ENDC 




.ENOM 





•••• n 7 •*•• 



uK^me MArttn Miinii u.nFr-77 PO-OA PkGf 1«i 



RSXHC MACRO H1 108 U-DEC-77 20:06 PAGE 1-A 



3 



; PROCESSOR STATUS READ/WRITE 



.IF NOF 


Lsssn 


.MACRO 


MFPS OST 


MOVB 


i#PS.OST 


.ENOM 




.MACRO 


MTPS SRC 


.IF IDN <*0>.<SRC> 


CLRB 


MPS 


.IFF 




MOVB 


SRC.a«PS 


.ENOC 




.ENDM 




.ENDC 





SAVE NONVOLATILE REGISTERS 



.MACRO SAVNR 
JSR R5.SSAVNR 
.ENDM 



GENERATE STATUS CONTROL BLOCK REFERENCE LABEL 



.IF DF EStDVC 
.MACRO SCBLB NUM. NAM 
.WORD t'NAM'NUM 
.ENDM 
.ENDC 



RETURN FROM SUBROUTINC 



.MACRO RETURN 
RTS PC 
.ENDM 



SOB LOOP INSTRUCTION 



.IF NDF RttElS 
.MACRO SOB A.B 
DEC A 
BNE e 
.ENDM 



*••• ] f ••«• 



I bewHA Hirbn Ml IftM 1/..! 



ftrr.77 an.rwk dam l.« 



RSXHC MACRO Ml 108 U-OEC-77 20:06 PAGE 1-5 






.ENDC 



STATE SWITCHING MACRO 



.MACRO SWSTKS ARG 

CALL SSWSTK.ARG 
.ENDM 

.IF DF F$»LPP 



LOAD FLOATING DOUBLE 



.MACRO LDD A. 8 

.NTYPE N.A 

.NTYPE M,B 

.WORD 172400*<M»6A.>»N 

.ENOM 



LOAD FLOATING POINT STATUS 



.MACRO LDFPS A 

.IF IDN <A>.<aH.FPSA(R2)> 

.WORD 170100*72 

•WORD H.FPSA 

• IFF 

.NTYPE N.A 

.WORD 170100*N 

.ENDC 

.ENOM 



; SET DOUBLE FLOATING MODE 

; 

.MACRO SETD 
.WORD 170011 
.ENDM 



; STORE FLOATING DOUBLE 

; 

.MACRO STD A.B 

.NTYPE N.A 

.NTYPE M.B 

.WORD 1^«000«<N*6A.>»M 

.ENDM 



; STORE FLOATING POINT STATUS 



•••* 



TT 



•••• 



I KBxMA MArttA H««A* 11._ncr.77 SA • Aik Okfit 1.A 



RSXMC MACRO MHOS U-DEC-77 20:06 PAGE 1-6 



•MACRO STFPS A 

.NTVPE N.A 

.yORD 170200tN 
.ENOM 



STORE STATUS 



.MACRO STST A 

•WORD 170337 

.WORD FLSTS 
.ENDM 

.ENDC 



.JIF NDF SSSVDF , .LIST 



•••• K f ••*« 



I mttmi 



Ik* M&rbn MltAB 1i._f\tr_79 ^f\,t\J,. Dktlt 3 



SYSDF MACRO Ml 108 U-DEC-77 20:06 PAGE 2 



.TITLE SYSDF 
. I DENT /06/ 



» 



Ut OOOOOi) 
A7 000000 

48 000000 

49 000000 
\0 



000000 



COPYRIGHT (C) iy^*i. i978 

DIGITAL EQUIPMENT CORPORATION. MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUtH LICENSE. 

VERSION 06 

D. N. CUTLER 25-AUG-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
C. A. D'ELIA 
T. J. MILLER 

MODIFIED BY: 

P. WANNHEDEN 8-JUN-77 

PW001 — ADD DEFINITIONS OF: 

D.RS17 - VECTOR ALREADY IN USE (CINT$) 
D.RS19 - ILLEGAL VECTOR (CINTS) 
D.RS81 - MAPPING ERROR (CINT$> 

P. WANNHEDEN 13-JUN-77 

PW002 — DEFINE ITB OFFSETS AND LENGTH GLOBALLY. 

SYSTEM GLOBAL AND CONTROL BLOCK OFFSET DEFINITIONS 

GLOBALLY DEFINE THE HIGHEST VECTOR ADDRESS 

.GL06L VtSCTR 



; DEFINE SYSTEM DEPENDENT CONTROL BLOCK OFFSETS AND LENGTHS GLOBALLY 
I 



•MCALL ITBDF$.PC80FI,PKTDFI,SCBOF$.TCBDFI 

ITBDFI <:>.<»>. SYSDEF ;DEFJNF 1TB OFFSETS AND LENGTH 

PCBDFI <:>,<»>. SYSDEF 

SCBDFI <:>..SYSDEF 

TCBDFI .<«>.SYSDEF 



; PWOO? 

; PW002 
DEFINE PCB OFFSETS AND LENGTH ;»*-1 
DEFINE SCB OFFSETS 
DEflNE TCB LENGTH 



CAUSE OFFSET DEFINITIONS FROM PREFIX FILES TO BE LISTED 



S$SYDF-0 



• ••• 



TT 



•••• 



•ookM •••«/«• «l_l^*r_W m.AA BA<>e 3_1 



SYSOF MACRO Ml 108 H-OEC-77 20:06 PAGE 2-1 



177777 



177776 



177773 



Mnn 



177771 



177770 



177766 



177760 



177757 



SYSTEM GLOBAL SYMBOL DEFINITIONS 

DIRECTIVE STATUS CODES 

INSUFFICIENT DYNAMIC CORE AVAILABLE TO SATISFY HEQUEST 

; 

D.RS1—-1. ; 

SPECIFIED TASK NOT INSTALLED IN THE SYSTEM 
D.RS2==-2. ; 

UNASSIGNED LUN 
D.RS5«-5. X 

DRIVER NOT LOADED 

O.RS6==-6. { 

TASK NOT ACTIVE 



D.RS7==-7. 



TASK NOT SUSPENDED/NO DATA QUEUED/TASK CHECKPOINTING ALREADY ENABLED 

OR DISABLED/AST RECOGNITION ALREADY ENABLED OR DISABLED/AST ENTRY ALREADY 

UNSPECIFIED 



D.RS8«»-8. \ 

ISSUING TASK NOT CHECKPOINTABLE 

D.RS10««-10. \ 

PRIVILEGE VIOLATION 



D.RS16««-16. \ 

VECTOR ALREADY IN USE (ClNTt) 
D.RS17—17. 

*••• M 7 •*•• 



PW001 
PWOOI 
PW001 
PWOOI 
PWOOI 



I auaKB M*Abn M4 1f\> 1i._(ker_*7 an.AA. DArC 3_3 



SYSDF MACRO MHOS 1A-DEC-77 20:06 PAGE 2-2 



177755 



177660 



177657 



177654 



177653 



177652 



17765' 



177646 



177644 



ILLEGAL VECTOR (CINTS) 
D.RS19==-19. 

DIRECTIVE ISSUED/NOT ISSUED FROM AST ROUTINE 
D.RS80==-80. ; 

CANNOT NAP ISR OR DISABLE-INTERRUPT ROUTINE (CINTI) 
D.RS81«-81. 

ALIGNMENT ERROR 
D.RS84»-84. ; 

ADDRESS WINDOW OVERFLOW 
D.RS85"-e5. ; 

INVALID REGION ID 
D.RS86SS-86. ; 

INVALID WINDOW ID 
D.RS87««-87. t 

SPECIFIED LUN IS LOCKED IN USE. 
D.RS90«»-90. i 

INVALID DEVICE AND/OR UNIT SPECIFIED. 
D.RS9i«»-92. I 

'; INVALID TIME PARAMEfER 

"" •••• H f •%« 



PW001 
PW001 
PW001 
PW0C1 
PW001 

PW001 

PW001 



PW001 
PW001 
PW001 
PW001 
PW001 
PW001 



SYSDF MACRO MllOB U-DEC-77 20:06 PAGE 2-3 



172 
173 
17A 
175 
176 
177 
178 
179 
180 
181 
182 
183 
18A 
185 
186 
187 
188 
189 
190 
191 
192 
193 
19A 
195 
196 
197 
198 
199 
200 
201 
202 
203 
204 
205 
206 
207 
208 
209 
210 
211 
212 
213 

V^ 
215 

216 

217 
218 
219 

II? 
IP 

% 



177643 



1776A2 



1776A1 



177640 



177637 



177636 



177635 



000002 



000000 



D.RS93==-93. ; 

; PARTI T JON/REGION NOT IN SYSTEM 

D.RS94«-94. 

• INVALID PRIORITY 

O.RS95s«-95. t 

: INVALID LUN 

D.RS96=»-96. ; 

; INVALID EFN OR REQUIRED EFN NOT SPECIFIED 

D.RS97«=-97. I 

: PART OF DPB IS OUTSIDE OF ISSUING TASK'S ADDRESS SPACE 



D.F!S98««-98. 

; INVALID DIC OR DPS SI7E 

D.RS99««-99. 

; EFN WAS SET 

D.RS22-2. 



; EFN WAS CLEAR 
t 

D.RSOO»0. 



I 



II 



; IF DYNAMIC ALLOCATION IS PRESENT DEFINE tMYNM GLOBALLY 

; 

.IIF DF DItYNM . Dlt>NM"0 ; 



•••• I I •••• 






L^ ^**_«« «ftA . AA AAA* %_A 



229 
230 
231 
232 
233 
23A 
235 
236 
237 
238 
239 
2A0 
2A1 
2A2 



000001 



C-77 20:06 


PAGE 2-4 




• IF 11/70 EXTENDED MEMORY IS PRESENT DEFINE MMEXT GLOBALLY 




.IIF DF MMEKT , M$$EXT==0 ; 




; IF MEMORY MANAGEMENT IS PRESENT DEFINE MSIMGE GLOBALLY 




.IIF DF MSSMGE , MSSMGE^^^O : 




.END 



mum c 8 tftt* 



r:rr 



SYSDF MACRO MHOS 
SYMBOL TABLE 



U-DEC-77 20:06 PAGE 2-5 



CStORE= 
D.RSOOs 
D.RS1 - 
O.RS10= 
O.RS16= 
O.RS17= 
O.RS19= 
0.RS2 = 
D.RS22= 
D.RS5 = 
0.RS6 = 
0.RS7 = 
D.RS8 - 
0.RS80' 
D.RS81- 
D.RS8A< 
D.RS85* 
D.RS86<: 
D.RS97' 
D.RS90« 
D.RS92* 
O.RS93= 
D.RS94* 
D.RS95« 
D.RS96* 

ABS. 



000400 
000000 
177777 
177766 
177760 
177757 
177755 
177776 
000002 
177773 
177772 
177771 
177770 
177660 
177657 
177654 
177653 
177652 
177651 
177646 
177644 
177643 
177642 
177641 
177640 



'>.RS97= 

i/.RS98= 

O.RS99= 

H$SRTZ= 

ICS$CNT« 

KSSCSRs 

K$tIEN= 

KS$LDC= 

K»»TPS= 

M$$CR8* 

P. ATT 

P.BLKS 

P.BUSY 

P.HDR 

P. IOC 

P.LGTHs 

P.LNK 

P.MAIN 

P.NAM 

P. OWN 

P.PRI 

P. PRO 

P.REL 

P.SIZE 

P.STAT 



177637 
177636 
177635 
000074 
177546 
177546 
000115 
000001 
000074 
000124 
000034 
000016 
000024 
000014 
000003 
000032 
000000 
000012 
000004 
000026 
000002 
000032 
000014 
000016 
000030 



177776 
000000 
ERRORS DETECTED: 



000 
001 



P. SUB 000010 G 


S.MPR 


000026 G 


T.MXSZ 


000050 


P.SWSZ 000022 G 


S.PKT 


000014 G 


T.NAM 


000006 


P.TCB 000026 G 


S.PRI 


000004 G 


T.OFF 


000060 


P.WA T 000020 G 


S.RCNT 


M7772 G 


T.PCB 


000046 


R$SF11= 000001 


S.ROFF 


177773 G 


T.PRI 


000002 


RSSJPO: 000000 


S.STS 


000011 G 


T.RCVL 


000012 


R$SJP1= 000001 


S.VCT 


000005 G 


T.RRFL 


000064 


RSSJSI:: 000001 


Tf$A11= 


000001 


T.SRCT 


000063 


R$SK11= 000001 


T$$C11= 


000001 


T.STAT 


000032 


rssph^ 000001 


T$$J16= 


000001 


T.ST2 


000034 


RMX11= 000001 


T»$ICHG= 


000000 


T.ST3 


000036 


RSS11M» 000000 


T»$H11= 


000001 


T.TCBL 


000030 


R»$11S« 000000 


T.ACTL 


000052 


T.UCB 


000026 


SSSECC:: 000000 


T.ASTL 


000016 


V$»CTR= 


000400 G 


SSSVDFs 000000 


T.ATT 


000054 


X.DSI 


000022 G 


SSSVSZ^ 001000 


T.CPCB 


000004 


X.FORK 


000012 G 


S.BMSK 177776 6 


T.DPRI 


00004C 


X.ISR 


000010 G 


S.BHSV 177774 6 


T.EFLG 


000022 


X.JSR 


000002 G 


S.CCB 000026 6 


T.EXT = 


000000 G 


X.LEN 


000032 G 


S.CON 000010 G 


T.IOC 


000003 


X.LNK 


000000 G 


S.CSR 000012 G 


TLBN 


000041 


X.PSW 


000006 G 


S.CTM OOOOGc S 


T.LDV 


000044 


X.TCB 


000024 G 


S.FRK 000016 G 


T.L6TH= 


000054 G 


X.VEC 


000026 G 


S.ITM 000007 G 


T.LNK 


000000 


X.VPC 


000030 G 


S.LKD 000000 G 











VIRTUAL MEMORY USED: 3619 WORDS ( 15 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:15 

C41.20]SYSOF,SYO:C41,30]SYSDF/-SPsC1.1]EXEMC/ML.C41.103RSXMC.C11.10]SYSOF 
XP> 



••*• p 8 **** 



r 




•**• ( I •••# 



<•*& H*rBA Mima i/.-Kcr_77 ^l\,nA. barb 9 



1 



SYSTB MACRO Ml 108 U-OEC-77 20:06 PAGE 2 



29 

30 000000 

31 

32 000000 

33 

34 000000 

IS 



4! 

43 000000 
46 



$ 



000000 
000000 



so 000000 




51 KXWOO 


000U6' 


52 )00002 


000034' 


UWi 


CfSo 


55 000010 


000032 


56 000012 
5? OOOOU 




160176 



001 



000170 160000 



.TITLE 
. I DENT 



SYSTB 
/M3.1/ 



COPYRIGHT (C) 1976, 1977 

DIGITAL EQUIPMENT CORPORATION. MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A 
SINGLE COMPUTER SYSTEM AND NAY BE COPIED ONLY WITH THE 
INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE. OR 
ANY OTHER COPIES THEREOF. MAY NOT BE PROVIDED OR OTHERWISE 
MADE AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH 
SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE 
TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN 
IN DEC. 

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT 
NOTICE AND SHOULD NOT BE CONSTRUED AS A COWITMENT BY DIGITAL 
EQUIPMENT CORPORATION. 

DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF 
ITS SOFTWARE ON EQUIPMENT WHITH IS NOT SUPPLIED BY DEC. 

VERSION M3.1 

SYSTEM TABLES 

MACRO LIBRARY CALLS 

HWDDFS 



.MCALL 

HWDDFS 

.MCALL SCBDFS 

SCBDFS ..SYSDEF 

.MCALL UCBDFS 

UCBDFS 

LOCAL ASSIGNMENTS 

UMD>0 

.IIF DF DttIAG.UMD'400 

ERL«0 

.IIF DF EISDVC.ERL=4 

DEVICE TABLES 

iDEVTB: : 



.•DEFINE HARDWARE REGISTERS 
;DEFINE SCB OFFSETS 
:DEFINE JCB OFFSETS 

.•DIAGNOSTIC FUNCTIONS BECOME LEGAL 



CT DCS 



.DCO: 



.IIF DF LDICT. ICTTBL«0 

.WORD .DC1 

.WORD .cro 

.ASCII /CT/ 

.BYTE O.CTH 

.WORD CTNO-CTST 

.WORD tCTTBL 

.WORD 160176.170.160000.0.7.0.1,6 



#••• F I •••« 



•««T« MArnn Hiina i/..ncr-77 9n*nA PAr.r >~^ 



SYSTB MACRO Ml 108 U-DEC-77 20:06 PAGE 2-1 



000022 000000 000007 000000 
000030 000001 000006 



00005A 
000034 
000036 
000040 
000042 
000044 
000046 
000050 
000052 
000054 
000056 
000000 



000066 
000066 
000070 
000072 
000074 
000076 
000100 
000102 
000104 
00U1O6 
000110 
000000 



000000 



03 000260 
04 

05 000262 

06 000120 



000034' 



000000' 
000034' 
000 
000 
000041 
000000 
000000 
000200 
000120' 
000000 

000066' 



000000* 
000066' 
000 
001 
000041 
000000 
000000 
000200 
000120' 

ocoooo 



CTST*. 



.CTO: 



000 
000 



000000 000000 



CTNO> 



.CTI; 



000 
000 



000000 000000 



000260 

OOOOOOG 
000340 



.IF OF 

.WORD 

.ENOC 



.IF 

.yORD 

.ENOC 

.WORD 
.yORD 
.BYTE 
.BYTE 
.WORD 
.WORD 
.yORD 
.yORD 
.WORD 
.WORD 



.IF 

.WORD 

.ENOC 

.WORD 
.WORD 
.BYTE 
.BYTE 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 



LSSORV 




DF msnup 





.DCO 

.-2 

0.0 

0.0 

DV.REC.'DV.SQD 





128. 

SCTO 

0.0.0.0 



DF nSSMUP 




.DCO 

.-2 

0.0 

1.0 

DV.REC.'DV.SQD 





128. 

»CTO 

0.0.0.0 



CT UCB'S 



CT SCB'S 



.IF NOF LDtCT 
.ASECT 



>260 
.IF DF 
.WORD 
.IFF 
.WORD 
.ENOC 
.WORD 
.PSECT 
.ENOC 
.IF DF 
.BYTE 
.BLKW 



EttDVC 

fCTOT 

KTINT 
PR7»0 



EtiDVC 

2.0 

2 



##•• 6 I tt** 



M*^Mn Miina ii.-f\cr.77 sn.rwi DAKC 3-3 



SYSTB MACRO Ml 108 U-DEC-77 20:06 PAGE 2-2 



111 

112 000120 

113 000120 
11A 000124 

115 000126 

116 000130 

117 000132 

118 00013A 

119 000136 
0OOU4 000000 

120 



000000 

300 

000 

000 

177500 

000000 

000000 



000001 



000120' 
054 
100 
000 



000000 000000 



SCTO: 



128 000146 

129 000146 

130 000150 

131 000152 

132 000154 

133 000156 

134 000160 


000332' 
000202' 
104 
000 
000036 
OOOOOOG 


102 
001 


138 000162 
000170 000000 
000176 000001 

139 


160037 
000007 
000006 


000030 160000 
000000 







CTH«1 

; 

• DCI: 



f4l 

148 
149 

150 000202 

151 00020^' 

152 000202 

153 000204 

154 000206 

155 000210 



000202' 



000146' 
000202' 
321 
000 



100 
000 



000212 140110 



161 000214 
164 000222 



000005 

001000 
000276' 



.ENDC 

.WORD 
.BYTE 
.BYTE 
•BYTE 
.WORD 
.WORD 
.WORD 

.IF OF 

.WORD 

.ENDC 



0..-2 

PR6IERL.260/4 

0,64. 

0*2.0 

177500 



0.0.0,0 

LtSDRV t NSSMGE 




D6 DCS 



.IIF DF LDSD6. SOSTBL>0 





.WORD 


.DC2 




.WORD 


.DBO 




.ASCII 


/DB/ 




.BYTE 


O.OBH 




.WORD 


DBND-DeST 




.WORD 


tDBTBL 




.IF DF 


ASSCPS 




.WORD 


177037:UMD. 30. 0.177000. 377. 0.0. 377 




.IFF 






.WORD 


160037IUHD.30.160000.0.7.0.1.6 




.ENDC 






.IF DF 


LttDRV 




.WORD 





• 


.ENDC 






DB U 


6Bsr«. 








.IF 


DF Mssnup 




.WORD 







.ENDC 




.TTO: 




;***PREVENT 


.DBO:: 








.WORD 


.DCI 




.WORD 


.-2 




.BYTE 


UC.AL6!UC.NPR!UC.PWr !1 .US.MNT 




.BYTE 


0.0 




.IF DF 


DtllAG 




.WORD 


DV.DIR!DV.NNT!DV.UMD!DV.Fn!DV.nXD 




.IFF 






.WORD 


DV.DIR!DV.«NT!DV.f11IDV.MXD 




.ENDC 






.WORD 


5 




.WORD 


1276 




.WORD 


M?. 




.WORD 


SDBO 






•••• H 1 •••• 



«««T* MAfkn mm* ii.-nrr.77 ^O'M PACT 1'\ 



SYSTB HACRO H1 108 U-OEC-77 20:06 PAGE 2-3 



00022A 
000000 



000240 
0002A0 
000242 
00024A 
000246 



000000 000000 000000 

000000 000000 

000240' DBNO: 



000146' 

000240' 

321 100 
001 000 



.DB1: 



000250 140110 



000252 
000254 
000256 
000260 
000262 
000000 



000264 



000300 

000302 
000276 



000005 

031276 

001000 

000276' 

000000 000000 000000 

000000 000000 



000300 



OOOOOOG 
000340 



.yORD 0,0.0,0.0.0 



• IF 
.yORD 
.ENDC 

.UORO 
.yORD 
•BrTE 
.BYTE 

• IF OF 
.UORD 
.IFF 
.yORD 
.ENDC 
.WORD 
.yORD 
.yORD 
.yORD 
.yORD 



DF Msnup 




.DC1 
-2 



UC.ALG!UC.NPR!UC.PyFI1.US.nNT 

DitlAG 
DV.DIR!DV.MNT!DV.UMDIDV.Fll!DV.nXD 

DV.DIR!DV.MNT!DV.F11 IDV.nXD 

5 

31276 

512. 

$080 

0,0,0.0.0.0 



D6 SCB'S 



.IF NOF LDSDfl 
•ASECT 



>300 
.JF OF 
.yORO 
• IFF 

.yoRO 

.ENDC 

.yORD 

.PSECT 

.ENDC 

.IF OF 

.BYTE 

.BLKU 



202 






.ENDC 


203 000276 




tOBO:: 




204 000276 


000000 


000276* 


.yORD 


205 000302 


240 


060 


.BYTE 


206 000304 


000 


004 


.BYTE 


207 000306 


000 


000 


.BYTE 


208 000310 


176700 




.yORO 


209 000312 

210 000314 


000000 




.yoRO 


000000 


000000 000000 


.yoRO 


000322 000000 










Ml 






• IF OF 




;;f 






.yoRO 








.ENDC 




[14 000324 


002124' 




.yoRO 


1 


>15 






.IF OF 


211 






.IF OF 



ESSDVC 
SDBOT 

tOBINT 

PR7*0 



EISOVCiOtSIAG 
20.. 



0..-2 

PRSlEiJl. 300/4 

0.4 

0*2.0 

176>00 



0.0.0.0 

LtlDRV t MISMGE 


.C7616 
LOtOB 

EtSOVC 



••t* I I •••« 



MAran ullA* 1i..r\cr_.77 sn.rUL OkC.C 3.A 



SYSTB MACRO mi08 U-OEC-77 20:06 PAGE 2-4 



219 
220 
221 
222 
223 
224 
225 
226 
227 
228 
229 
230 
231 
232 
233 
234 
235 
236 
237 
238 
239 
240 
000354 
000362 
241 
242 
243 
244 
245 
246 
247 
248 
249 
250 
251 
252 
253 
254 
255 
256 
257 
258 
259 
260 
261 
262 
263 
264 
265 
266 
000416 
267 



000326 
000330 



000332 
000332 
000334 
000336 
000340 
000342 
000344 



000346 
000000 
000001 



000366 
000366 
000370 
000372 
000374 



000400 
000402 
000404 
000406 
000410 
000000 



271 

272 000504 



OOOOOOG 



000340 
000001 



000452' 
000366' 
104 
000 
000036 
OOOOOOG 



DBHs:1 



.DC2: 



106 
000 



160037 000030 160000 
000007 000000 
000006 



000366' 



000332' 

000366' 

301 100 
000 000 



fST«. 



.DFO: 



000376 140010 



000000 

002000 

001000 

000424* 

000000 

000000 

000424' 



000000 000000 
000000 



DFND-. 

I 

I 



.WORD SDBOT 

.IFF 

.WORD SDBINT 

.ENDC 

.ENDC 

.WORD PR7tO 



.IIF DF LD$DF, $DFTBL=0 



DF DCB 



.WORD .DC3 

.WORD .DFO 

.ASCII /DF/ 

.BYTE 0.1-1 

.WORD DFND-DFSr 

.WORD SDFTBL 

.IF DF AtSCPS 

.WORD 177037:U«D. 30. 0.177000. 377.0. 0.377 

.IFF 

.WORD 160037!UMD.30.160000.0.7.0.1.6 



.ENDC 

.IF DF LSSDRV 

.WORD 

.ENDC 



.IF 

.WORD 

.ENDC 

.WORD 

.WORD 

.BYTE 

.BYTE 

.IF DF 

.WORD 

.IFF 

.WORD 

.ENDC 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 



DF UCB'S 



DF MSSMUP 




.DC2 
.-2 

UC.ALG!UC.NPR!1,US.«NT 

0.0 

DStlAG 

DV.DIR!DV.MNT!DV.UMD!DV.F11 

DV.DIR!DV.nNT!DV.F11 





1024. 

512. 

SDFO 
0.0.0.0.0.0 



DF SCB'S 



.IF NDF LDIDF 
.ASECT 



••*• J 8 **** 



atf-c 9_C 



SYSTB MACRO Ml 108 U-OEC-77 20:06 PAGE 2-5 



000204. 



00020A COOOOOG 

000206 0OO3A0 
00042A 



0OOA24 

00042A 000000 00042A' 

000A30 2A0 0A1 

000432 000 OOA 

OOOAM 000 000 

000436 177460 

0004AO 000000 

000442 000000 000000 000000 

000000 



000474 
000502 
319 



308 000452 
509 000452 

310 000454 

311 000456 

312 000460 

313 000462 

314 000464 
315 

316 
317 

318 000466 

' 000000 

000001 



$DF0: 



000630' 
000506* 
104 
000 
000036 
OOOOOOG 



113 
001 



160037 
000007 
000006 



000030 
00C300 



160000 



000506' 



.=204 

.IF OF 

.WORD 

.IFF 

.WORD 

.ENDC 

.WORD 

.PSECT 

.ENDC 

.IF DF 

.BYTE 

.BLKW 

.ENDC 

.WORD 
.BYTE 
.BYTE 
.BYTE 
.WORD 
.WORD 
.WORD 



ESSDVC 
SDFOT 

SDFINT 

PR7*0 



ESSDVC !DSSI AG 

8..0 

2 



0..-2 

PR5IERL, 204/4 

0.4 

0*2.0 

177460 



0.0.0.0 





.IF DF 


LSSDRV ft MSSMGE 




.WORD 







.ENDC 






.IF DF 


MSSEXT 




.WORD 







.WORD 


10 




.WORD 







.WORD 







.BLKW 


2 


; 
1 


.ENDC 






OK 


.IIF DF 


LDSOK. SDKTBL'O 


.DC3: 








.WORD 


.DC4 




.WORD 


.DKO 




.ASCII 


/DK/ 




.BYTE 


O.DKH 




.WORD 


DfCND-OKST 




.WORD 


SDKTBL 




.IF DF 


ASSCPS 




.WORD 


177037IUMD. 30. 0.177000. 377. 0.0. 377 




.IFF 






.WORD 


160037!UMD.30.160000.0.7.0.1.6 




.ENDC 






.IF OF 


LSSDRV 




.WORD 





\ 

t 
» 


.ENDC 






DK 


6»CST«. 







DK UCB'S 



•#•• K % ••*• 



. ••& tA^ft^r\ M4 4 AA 



1i._l\i;r-79 3/\.rU. DAf:C 3_A 



SYSTB MACRO M1108 U- 


-DEC-77 20:06 PA 


327 






328 






329 






330 000506 






331 000506 


000452' 




332 000510 


000506' 




333 000512 


321 


100 


33A 0005U 


000 


000 


335 






336 






337 






338 000516 


140010 




339 






3<iO 000520 


000000 




3A1 000522 


011300 




3A2 0OO52A 


001000 




3*3 000526 


000602' 




3A4 000530 


000000 


000000 000000 


000536 000000 


000000 


000000 


3A5 


000544' 




3A6 






3A7 






348 






349 0005AA 






350 000544 


000452' 




351 000546 


000544' 




352 000550 


321 


100 


353 000552 


001 


000 



PAGE 2-6 



.DKO: 



DKND: 



.DKI: 



000554 140010 



000556 
000560 
000562 
000564 
000566 
000000 



368 000210 

371 

37? 

373 000220 

374 

}75 000222 

S76 000602 



000000 

011300 

001000 

000602' 

000000 000000 000000 

000000 ocoooo 



000220 



OOOOOOG 
000340 



.IF 

.WORD 

.ENDC 

.WORD 

.WORD 

.BYTE 

.BYTE 

• IF DF 

.WORD 

.IFF 

.WORD 

.ENDC 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 



.IF 

.WORD 

.ENDC 

.WORD 

.WORD 

.BYTE 

.BYTE 

.IF DF 

.WORD 

• IFF 

.WORD 

.ENDC 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 



DF N$$MUP 




.DC3 

.-2 

UC.ALG!UC.NPR!UC.PWF !1 .US.MNT 

0,0 

DSSIAG 

DV.DIR!DV.MNTIDV.UMD!DV.F11 

DV.DIR!DV.MNT!DV.F11 



4800. 

512, 

SDKO 

0,0.0,0,0,0 



DF nSSMUP 




.DC3 
.-2 

UC.ALG!UC.NPR!UC.PWF!1,US.MNT 

1.0 

DSSIAG 

DV.DIR!DV.MNT!DV.UMD!DV.ri1 

DV.DIR!DV.MNT!DV.F11 



4800. 

512. 

SDKO 

0.0.0.0.0.0 



DK SCB'S 



.IF NDF LDSDK 
.ASECT 



•220 
.IF DF 
.WORD 
.IFF 
.WORD 
.ENDC 
.WORD 
.PSECT 
.ENDC 
.If DF 
•BYTE 
.BLKW 
.ENDC 



ESSDVl 
SDKOT 

SDK I NT 

PR7*0 



ESSDVC!DSSIAC 
6.374 



ft*** I 8**** 



<,_1^>»_W 4A.AA BA/!P 1_9 



SYSTB HACRO Ml 108 H-DEC-77 20:06 PAGE 2-7 



382 
383 
38A 
385 
386 
387 
388 
389 
000626 
390 
391 
392 
393 
39A 
395 
396 
397 
398 
399 
AOO 
A01 
402 
A03 
AOA 
A05 
A06 
A07 
A08 
A09 
410 
411 
412 
413 
414 
415 
000652 
000660 
416 
417 
418 
419 
420 
421 
422 
423 
424 
425 
426 
427 
428 
429 
430 
451 
432 
435 
454 
435 



J0602 
000602 
000606 
000610 
000612 
000614 
00f^M6 
OC j20 
000000 



000630 
000630 
000632 
000634 
000636 
000640 
000642 



000644 
000000 
000001 



000664 
000664 
000666 
000670 
000672 



000000 000602' 

240 044 

000 004 

000 000 
177404 
000000 

000000 000000 000000 



SDKO:: 



000001 



001006* 
000664' 
104 
000 
000056 
OOOOOOG 



0KH»1 

; 

.DC4: 



120 
001 



160057 000050 160000 
000007 000000 
000006 



000664' 



000650' 
000664' 
525 
000 



; 
I 

« 

6pst«. 

.OPO:: 



100 
000 



000674 140010 



.WORD 0..-2 

.BYTE PR5IERL. 220/4 

.BYTE 0,4 

.BYTE 0*2,0 

.WORD 177404 

.WORD 

.WORD 0,0,0,0 

.IF DF LSSDRV I MSSMGE 

.WORD 

.ENDC 

.IF DF nSSEXT 

.WORD 

.WORD 10 

.WORD 

.WORD 

.BLKW 2 

.ENDC 



.IIF DF LDSDP. $DPTBL=0 



DP DCB 



.WORD .DC5 

.WORD .DPO 

.ASCII /DP/ 

.BYTE O.DPH 

.WORD DPND-DPST 

.WORD SDPTBL 

.IF DF ASSCPS 

.WORD 177057!UMD. 50. 0.177000. 577. 0.0. 577 

.IFF 

.WORD 160057!U«D. 50.160000. 0.7. 0.1. 6 



.ENDC 

.IF DF LSSDRV 

.WORD 

.ENDC 



DP UCB'S 



.IF 

.WORD 

.ENDC 

.WORD 

.WORD 

.BYTE 

.BYTE 

• IF DF 

.WORD 

Air 

.WORD 



DF MSSnUP 




.DC4 
-2 



UC.ALG:UC.NPR!UC.PWF15.US.MNT 

0.0 

DSSIAG 

DV.DiRIDV.MNTlDV.UHDI0V.F11 

DV.DIRIDV.MN1IDV.F11 



*••• M g •*•• 



t.f\J. BAf^C 3. 



SYSTB MACRO Ml 108 U-DEC-77 20:06 PAGE 2-8 



436 
A37 
A38 
439 
AAO 
4A1 
00071A 
AA2 
AA3 
AAA 
AA5 
AA6 
AA7 
AA8 
AA9 
A50 
A51 
A52 
A53 
ASA 
A55 
A56 
A57 
ASS 
A59 
A60 
000752 
A61 
A62 
A65 
A6A 
A65 
A66 
A67 
A69 
A69 
A 70 
A 71 
A 7? 
A73 
A7A 
A 75 
A76 
A77 
A 78 
A 79 
A80 
481 
A82 
A83 
ASA 
A85 
A86 
lOOIOOA 
A87 
ASS 
A89 



000676 
000700 
000702 
00070A 
000706 
000000 



000722 
000722 
00072A 
000726 
000730 



00073A 
000736 
0007AO 
0007A2 
0007AA 
000000 



00022A 



00025A 

000256 
000760 



000760 
000760 
00076A 
000766 
000770 
000772 
00077A 
000776 
000000 



100001 

03A200 

001000 

000760' 

000000 000000 000000 

000000 ocoooo 

000722' OPND= 



000630' 

000722' 

323 100 
001 000 



.DPI: 



000732 1A0010 



100001 

03A200 

001000 

000760' 

000000 000000 000000 

000000 000000 



00025A 



OOOOOOG 
0003A0 



000000 000760' 

2A0 0S3 

000 OOA 

000 000 
17671A 
000000 

000000 000000 000000 



$DP0: 



.ENDC 

.WORD 100001 

.WORD 3A200 

.WORD 512. 

.WORD SDPO 

.WORD 0.0.0.0,0,0 



.IF 

.WORD 

.ENDC 

.WORD 

.WORD 

.BYTE 

• BYTE 

.IF DF 

.WORD 

.IFF 

.WORD 

.ENDC 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 



DF MSSMUP 




.DCA 
.-2 

UC.ALG!UC.NPR!UC.PWF!3,US.MNT 
1.0 

DSSIAG 
DV.DIR!DV.MNT!DV.UMD1DV.F f1 

DV.DIR!DV.MNT!DV.F11 

100001 

3A200 

512. 

SDPO 

0.0,0.0.0.0 



DP SCB S 



.IF NDF LDSDP 
.ASECT 



.»25A 

.IF DF 

.WORD 

• IFF 

.WORD 

.ENDr 

.WORD 

.PSECT 

.ENDC 

.IF Dr 

.BYTE 

.BLKW 

■ ENDC 

.k'ORD 
.BYTE 
.BYTE 
.BYTE 
.WORD 
.WORD 
.WORD 

.IF DF 

.WORD 

.ENDC 



ESSDVC 
tDPOT 

SDPINr 

PR7*0 



ESSDVC .'DSSIAG 

12..37A 

2 



0,.-2 

PR5IERL.25A/A 

O.A 

0»2.C 

176^4 



0,0,0.0 

LSSDRv t Mssnoe 





**•• N I **** 



SYSTB MACRO Ml 108 U-DEC-77 20:06 PAGE 2-9 



A90 
491 
A92 
A93 
A9A 
495 
4% 
497 
498 
499 
500 
501 
502 
503 
504 
505 
506 
507 
508 
509 
510 
511 
512 
001030 
001036 
513 
514 
515 
516 
517 
518 
519 
520 
521 
522 
523 
524 
525 
526 
527 
528 
529 
530 
531 
532 
533 
534 
585 
536 
537 
538 
001072 
539 
540 
541 



.IF OF MSSEXT 
.WORD 



001006 
001006 
001010 
001012 
001014 
001016 
001020 



001022 
000000 
000001 



001042 
00104? 
001044 
M046 
owl 050 



000001 



001172' 
001042' 
104 
000 
000036 
OOOOUOG 



0PH=1 



.DCS: 



123 
001 



160037 000030 
000007 000000 
000006 



160000 



001054 
001056 
001060 
001062 
001064 
000000 



001100 



001042' 



001006' 

001042' 

301 100 
000 000 



DSST=. 



.DSO: 



001052 140110 



lOOQOQ 
004000 
001000 
001136' 

QQOgOO 000000 000000 
- 000000 



wm- 



DSNO>. 



.DSlii 



.WORD 
.WORD 
.WORD 
.BLKW 
.ENDC 



10 


2 



DS DCB 



.IIF DF LDSDS, $DSTBL=0 



.WORD .DC6 

.WORD .DSO 

.ASCII /DS/ 

.BYTE 0,DSH 

.WORD DSND-DSST 

.WORD tDSTBL 

.IF DF AI»tPS 

.WORD 1770371UMD. 30,0. 177000.377.0.0,377 

.IFF 

.WORD 160037!UMD, 30, 160000.0, 7,0. 1.6 



.ENDC 

.IF DF LSSDRV 

.WORD 

.ENDC 



.IF 

.WORD 

.ENDC 

.WORD 

.WORD 

.BYTE 

.BYTE 

.IF DF 

.WORD 

.IFF 

.WORD 

.ENDC 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 



.IF 

.WORD 

.ENDC 



DS UCB'S 



DF mSMUP 




.DC5 
.-2 

UC.AL6!UC.NPR!1,US.MNT 

0.0 

DttlAG 

DV.DIR!DV.MNT!DV.UMD!0V.F11!DV.MXD 

DV.DIR!DV.MNT!DV.F11!DV.nXD 

100000 

4000 

512. 

IDSO 

0.0,0,0.0,0 



DF MSMUP 




•••• I 9 ttt* 



SYSTB MACRO Ml 108 U-DEC-77 20:06 PAGE 2-10 



54A 
5A5 
SA6 
5A7 
SAB 
5A9 
550 
551 
552 
553 
55A 
555 
556 
557 

001130 
558 
559 
560 
561 
562 
563 
56A 
565 
566 
567 
568 
569 
570 
571 
572 
573 
57A 
575 
576 
577 
578 
579 
580 
581 
582 
583 

001162 
58A 
585 
586 
587 
588 
589 
590 
591 
592 
593 
59A 
595 
596 
597 
598 



001100 001006' 

001102 001100* 
00110A 301 100 
001106 001 000 



001110 1A0110 



001112 
00111A 
001116 
001120 
001122 
000000 



000260 



000310 

000312 
001136 



001136 
001136 
001 1A2 
001 1AA 
001 1A6 
00n50 
001152 
0Cn5A 
000000 



100000 

OOAOOO 

001000 

001136' 

000000 000000 000000 

000000 000000 



000310 



OOOOOOG 
0003A0 



000000 001136' 

2A0 062 

000 OOA 

000 000 
1720A0 

ooooco 

000000 000000 000000 



SDSO: 



001 16A 002132' 



001166 
001170 



OOOOOOG 



0003A0 
000001 



0SH«1 



.WORD 

.yORD 

.BYTE 

.BYTE 

.IF DF 

.yORD 

.IFF 

.WORD 

.ENDC 

.WORD 

.yORD 

.yORD 

.yORD 

.yORD 



.0C5 

.-2 

UC.AL6!UC.NPR!1,US.HNT 

1.0 

DSSIAG 

DV.DIR!DV.MNT!DV.UMD!DV.F11!DV.nXD 

0V.DIRIDV.MNTiDV.F11 iOV.MXD 

100000 

AOOO 

512. 

SDSO 

0.0.0,0,0.0 



DS SCB'S 



.IF NDF LDSDS 
.ASECT 



.=310 




.IF DF 


ESSDVC 


.WORD 


SOSOT 


.IFF 




.yORD 


SOSINT 


.ENDC 




.yORD 


PR7tO 


.PSECT 




.ENDC 




.If DF 


ESSOVCID$$IAG 


.BYTE 


12. .0 


.BLKW 


2 


.ENDC 




.yoRD 


0..-2 


.BYTE 


PR5!ERL.310/A 


.BYTE 


O.A 


.BYTE 


0*2-0 


.yORD 


1720*0 


.yORD 





.yORD 


0.0,0.0 


.IF DF 


LSSPRV i MSSAGE 


.yORD 





.ENDC 




.yoRD 


.CM 52 


.IF DF 


LDSDS 


.yORD 





.IF! 




.IF OF 


ESSDVt 


.WviRO 


SOSOT 


.Iff 




.yoRO 


SOSINT 


.ENDC 




.ENDC 




.WORD 


PR7tO 



•••• c 9 **** 



I 



SYSTB MACRO mi 03 U-DEC-77 20:06 PAGE 2-11 



DT DCB 



001172 
001172 
001 17A 
001176 
001200 
001202 
001 20A 



001206 
000000 
000001 



001360' 
001226' 
10A 
000 
000042 
OOOOOOG 



.&C6: 



124 
001 



160037 000030 160000 
000007 000000 
000006 



001226' 



625 001226 






626 001226 


001172' 




627 001230 


001226' 




628 001232 


301 


100 


629 001234 


000 


000 


633 001236 


14C010 




634 






635 001240 


000000 




636 001242 


001102 




637 001244 


001000 




638 001246 


001332' 




639 001250 


000000 


000000 000000 


001256 000000 


000000 


000000 


001264 000000 


000000 
001270' 




S 






644 001270 






645 001270 


001172* 




646 001272 


001270' 




647 00127. 


301 


100 


648 001276 


001 


000 



DTST=. 



.DTO: 



DTNDs. 



.DTI: 



,IIF DF LDSDT, $DTTBL=0 



.WORD .DC7 

.WORD .DTO 

.ASCII /DT/ 

.BYTE O.DTH 

.WORD DTND-DTST 

.WORD SDTTBL 

.IF DF ASSCPS 

•WORD 177037!UMD, 30.0. 177000. 377.0. 0.377 

• IFF 

.WORD 160037!UND, 30, 160000.0. 7,0. 1,6 



.ENDC 

.IF DF LSSDRV 

.WORD 

.ENDC 



.IF 

.WORD 

.ENDC 

.WORD 

.WORD 

.BYTE 

.BYTE 

.IF DF 

.WORD 

-IFF 

.WORD 

.ENDC 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 



• IF 

.WORD 

.ENDC 

.WORD 

.WORD 

.BYTE 

.BYTE 

.IF DF 

.WORD 

.IFF 



DT UCB'S 



DF M$SMUP 




.DC6 

„-2 

UC.AL6!UC.NPR!1,U3.RNT 

0,0 

DSSIAG 

DV.DIR!DV.MNT!DV.UND!DV.F11 

DV.DIRIDV.MNTiDV.FII 





578. 

512. 

SDTO 

0,0,0,0.0,0.0.0 



DF MSSMUP 




.DC6 
.-2 

UC.ALG!UC.NPR!1.US.nNT 

1.0 

DttlAG 

DV.DIR!DV.MNT!DV.UM0!DV.F11 



t*** D 9 **** 



rrrr 



SYSTB MACRO M1108 U-DEC-77 20:06 PAGE 2-12 



6S2 001300 

653 

65A 001302 

655 001 30A 

656 001306 

657 001310 

658 001312 
001320 000000 
001326 000000 



0003U 



0002U 

000216 
001332 



676 
677 
678 
679 
680 
681 
682 
683 
684 
001356 



001332 
001332 
001336 
001340 
001 3A2 
001344 
001346 
001350 
000000 



140010 

000000 

001102 

001000 

001332' 

000000 000000 000000 

000000 000000 

000000 

000214 

OOOOOOG 
000340 



000000 


001332' 




300 


043 




000 


007 




000 


000 




177342 






000000 






000000 


000300 


000000 



000001 



001360 

701 001360 001536' 

702 001362 OOV'U' 

704 001M6 000 

705 001370 000036 



130 
001 



.wo:<o 

.ENDC 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 



DV.DIR!DV.MNT!DV.F11 



578. 

512. 

SDTO 

0,0.0.0.0,0.0,0 



DT SCB'S 



.IF NDF 


LDSDT 


.ASECT 




.=214 




.IF DF 


ESSDVC 


.WORD 


$DTOT 


.IFF 




.WORD 


SDTINT 


.ENDC 




.WORD 


PR7*0 


.PSECT 




.ENDC 




.IF DF 


ESSDVC !DS$I AG 


.BYTE 


5.376 


.B KW 


2 


.ENDC 
tnrn- • 




9V lU* • 

.WORD 


0..-2 


.BYTE 


PR6IERL.214/4 


,«YTE 


0.7 


.L.TE 


0«2.0 


.WORD 


177342 


.WORD 





.WORD 


0.0.0.0 


.IF DF 


LSSDRV t nSSMGE 


.WORD 





.ENDC 




.IF DF 


nSSEXT 


.WORD 





.WORD 


10 


.WORD 





.WORD 





.BLKW 


2 


.ENDC 




DTH«1 




• 




1 




.IIF DF 


LDSDX. SDXTBL'c 


.0C7: 




.WORD 


.DC8 
.DXO 


.WORD 


.ASCII 


/DX/ 


.BYTE 


O.DXH 


.WORD 


DXND-DXST 



DX DCB 



•••t E 9 **** 



»«>*& M*rbn Mlina 



ii.-ncr>-77 in.rn^ D4r.r 3.1 1 



SYSTB NACRO mi 08 U-OEC-77 20:06 PAGE 2-13 



706 001372 OOOOOOG 

707 

708 

709 

710 001 37A 160037 000030 160000 
OOU02 000000 000007 000000 
001 A10 000001 000006 



OOUU 
OOUU 
00U16 
00U20 
00U22 
00U2A 
00U26 
00U30 
00U32 
0OU34 
00U36 
000000 



00U52 
0OU52 
00U54 
00U56 
00U60 
00U62 
00U64 
00U66 
QOU70 
0OU72 
00U74> 
000000 



000220 



OOUU* 



001560* 
OOUU* 

201 100 

000 000 

U0010 
000000 
000756 
001000 
001510* 

000000 000000 000000 
000000 000000 
OOU52' 



* 
DXST=. 



.DXO: 



100 
000 



001360* 
00U52* 

201 

001 
U0010 
000000 
000756 

000000 000000 000000 
000000 000000 



000264 



DXND=. 



.DX1: 



757 000264 OOOOOOG 
7S8 



.yORD SDXTBL 

.IF DF ASSCPS 

.yORO 175037.30.0.175000.377.0.0.377 

.IFF 

.yORD 160037.30.160000,0.7.0.1.6 



.ENOC 

.IF DF LSSDRV 

.WORD 

.ENOC 



.IF DF raSMUP 

.yORD 
.ENOC 

.yORD .DC7 

.yORD .-2 

.BYTE UC.ALG!1.US.«NT 

.BYTE 0.0 

.yORD DV.DIR!DV.MNT!DV.F11 

.yORD 

.yORD 494. 

.yORD 512. 

.yORD WXO 

.yORD 0.0.0.0.0,0 



.IF DF MSSMUP 

.yORD 
.ENOC 

.yORD .DC7 

.yORD .-2 

.BYTE UC.ALG.'I.US.MNT 

.BYTE 1.0 

.yORD DV.DIR!DV.MNTIDV.F11 

.yORD 

.yORD 494. 

.yORD 512. 

.yORD IDXO 

.yORD 0.0.0.0.0.0 



.IF NDF LDSDX 
.ASECT 



DX UCB'S 



DX SCB'S 



■264 

.IF OF 

.yORD 

.IFF 

.yORD 

.ENOC 



EStDVC 
IDXOT 

tOXlNT 



•••• f 9 **** 



cwcTA MAran aiina 1i..ABr.77 M-ftA OACJ 3>1A 



SYSTB MACRO mi08 U-OEC-77 20:06 PAGE 2-U 



001534 
77^ 



759 000266 

760 001510 
761 



766 001510 

767 001510 
766 001 5U 

769 001516 

770 001520 

771 001522 

772 001524 

773 001526 
000000 



000340 



001556 
001536 
001540 
001542 
001544 
001546 
001550 



792 

001560 
001 V66 
793 



001552 
000000 
000001 



1572 
1572 
001574 
001576 
001600 



000000 001510' 

240 055 

000 004 

000 000 
177170 
000000 

000000 000000 000000 



000001 



SDXO: 



001726' 
001572' 
115 
000 
000040 
OOOOOOG 



0XM«1 

* 

.DCS: 



115 
001 



120177 000170 160000 
000007 000000 
000006 



001572' 



001536' 
001572' 
301 
000 



msj'. 



100 
000 



.yORD 

.PSECT 

.ENDC 

• IF OF 

.8VTE 

.BLKU 

.ENDC 

.yORD 

.erTE 

•BYTE 
.BYTE 
.yORD 
.WORD 
yORD 

.IF DF 

.WORD 

.ENDC 



PR7»0 



EtSDVC 

2.0 

2 



0..-2 

PRS.'ERL. 264/4 

0.4 

0«2,0 

177170 



0.0.0.0 

LftSDRV t mV¥X 




m DCB 



.IIF DF LDSMM. SDWTBL'O 



.WORD 

.WORD 

.ASCII 

.BYTE 

.WORD 

.WORD 

.IF DF 

.WORD 

.IFF 

.WORD 



.IF 

.WORD 

.ENDC 

.WORD 
.WORD 

.BYTE 
.BYTE 
.IF DF 
.IF DF 
.WORD 
.IFF 



.DC9 



/m/ 

0. 



vmJBi 

ASMS I 
171177.170.10000.161000.537.0.0.53.' 

120177,170.160000.0.7.0.1.6 



.ENDC 

.IF DF LISDRV 

.WORD 

.ENDC 



UCB'S 



'.us.» 



OF ntSMJP 




.DCS 

j|C^AlG!UC. 

AIMS I 
Off I AG 

DV.RECIDV.SQO!OV.rn!DV.MNT:OV.UMD:DV.nxD 



•••• fi 9 •••• 



kf Kn •>« t AS 



tx_fkBr-T7 3A.I\A. BAftC 9.K 



SYSTB HACRO «n08 K-OEC-77 20:06 PAGE 2-15 



813 

8U 

815 

816 

817 

818 

819 001602 

820 

821 

822 001604 

823 001606 

824 001610 

825 001612 

826 0016U 
001622 000000 
001630 000000 

827 
K8 



831 001632 

832 001632 

833 001634 

834 001636 

835 001640 



000141 



000004 
000000 

001000 
001672' 
000000 
000000 

001632' 



001536' 
001632' 
301 
001 



000000 
000000 



000000 



ffVO' 



.fWI: 



100 
000 



001642 000141 



9 001644 000004 

150 001646 000000 

)51 001650 001000 

152 001652 001672' 

153 001654 000000 000000 000000 
001662 000000 000000 000000 
001670 OOOOUO 

154 



l58 000270 



000320 



&3 000320 OOOOOOG 
&5 000322 000340 



.WORD 

.ENDC 

.IFF 

.IF OF 

.yORD 

.IFF 

.yORO 

.ENDC 

.ENDC 

.yORD 

.yORD 

.yORD 

.yoRO 

.yORD 



.IF 

.yORD 

.ENDC 

.yORD 

.yORD 

.BYTE 

.BYTE 

.IF OF 

.IF OF 

.yORD 

.IFF 

.yORO 

.ENDC 

.IFF 

.iF OF 

.yORD 

.IFF 

.yoRO 

.ENDC 
.ENDC 
.yORD 

.yoRO 
.yoRO 

.yORD 

.yoRO 



DV.REC!DV.SQD!DV.F11!DV.NNT!DV.MXD 



DSSIAG 
DV.REC!DV.SQD!DV.UMD!DV.NXD 

DV.REC1DV.SQD!DV.MXD 



4 



512. 

WK) 

0.0,0,0.0.0,0 



OF mSMUP 




.DCS 
.-2 

UC.ALGIUC.NPRII.US.MNT 

AilNSI 
OtSIAG 

dv.rec:dv.sod!dv.fiiidv.hnt!ov.u«o:dv.«xd 
0v.rec!dv.sqd!0v.f11!dv.nnt!dv.mxd 



DM I AG 
DV.REC!DV.SQDIDV.URD!OV.MXD 

DV.REC!DV.SQD!OV.MXD 



4 



512. 

MNO 

0,0,0,0.0.0.0 



m scB's 



.IF NOF iovm 



.IF OF 

.yORD 

.IFF 

.yORD 
.ENDC 
.yORD 



EltOVC 

MNOT 

tmiNT 
PR7*0 



•••• H 9 **** 



c«*t» MAfttn Ml ins ii..ncr.77 9n*nA P*cf 9-1 A 



SYSTB MACRO Ml 108 U-OEC-77 20:06 PAGE 2-16 



866 0OUi72 






867 






868 






869 






870 






871 






872 001672 






or 3 001672 


000000 


001672' 


874 001676 


240 


064 


875 001700 


000 


005 


876 001702 


000 


000 


877 001704 


172440 




878 001706 


000000 




879 001710 


000000 


000000 000000 


001716 000000 






880 






881 






882 






883 001720 


002140' 




884 






885 






886 






887 






888 






889 






890 001722 


OOOOOOG 




891 






892 






893 001724 


000340 




894 


000001 




895 






896 






897 






898 






899 001726 






900 001726 


002146' 




901 001730 


001762' 




902 001732 


115 


124 


903 001734 


000 


001 


904 001736 


000036 




905 001740 


OOOOOOG 




906 






907 






908 






909 001742 


120177 


000170 160000 


001750 000000 


000007 


000000 


001756 000001 


000006 




910 






911 







SMMO: 



l«1 



,DC9: 



912 
913 
914 
915 
916 
917 
918 
919 



001762' 



«TST«. 



.PSECT 

.ENDC 

.IF DF 

.BYTE 

.BLKW 

.EN&C 

.yORD 
•BYTE 
.BYTE 
.BYTE 
.yORD 
.WORD 
.WORD 

.IF OF 

.WORD 

.ENDC 

.WORD 

.IF DF 

.WORD 

.IFF 

.If DF 

.WORD 

.IFF 

.WORD 

.ENDC 

.ENDC 

.WORD 



ESSDVCIDSSIAG 

14. .0 

2 



0,.-2 

PR5!ERL. 320/4 

0.5 

0*2.0 

172440 



0.0,0,0 

LSSDRV ft MSMGE 


.C5408 

LDSm 



ESSDVC 
IMMOT 

SmiNT 



PR7*0 



MT DCB 



.IIF DF LDWT. WTTBL'O 



.WORD .DC10 

.WORD .MTO 

.ASCII mi/ 

.BYTE O.MTH 

.WORD MTND-MTST 

.WORD SMTTBL 

.IF DF ASSNSI 

.WORD 171177,170.10000.161000.537.0.0.537 

.IFF 

.WORD 12017/. 170. 160000,0, 7,0, 1.6 



.ENDC 

.IF DF LSIDRV 

.WORD 

.ENDC 



MT UCB'5 



.IF DF MSIMUP 

.WCIRD 



•••• I 9 •••* 



MArbn Ml ma 



ii.-i\cr.77 sn.ruL. D*r^ 3.17 



SYSTB WACRO Ml 108 H-DEC-77 20:06 PAGE 2-17 



920 
921 
922 
923 
924 
925 
926 
927 
928 
929 
930 
931 
932 
933 
934 
935 
936 
937 
938 
939 
940 
941 
942 
943 

002012 
944 
945 
946 
947 
948 
949 
950 
951 
952 
953 
954 
955 
956 
957 
958 
959 
960 
961 
962 
963 
964 
965 
966 
967 
968 
969 
970 

002050 
971 
972 
973 
974 



001762 
001762 
001764 
001766 
001770 



001774 
001776 
002000 
002002 
002004 
000000 



002020 
002020 
002022 
002024 
002026 



002032 
002034 
002036 
002040 
002 



001726' 

001762' 

301 100 
000 000 



.HTO: 



001772 000041 



000000 

000000 

001000 

002056' 

000000 000000 000000 

000000 000000 

002020' NTNO= 



001726' 

002020' 

301 100 
001 000 



.my. 



002030 000041 



000000 
000000 
001000 
002056 
OOQOQO 0( 
000000 " 



000000 



.ENDC 

.WORD 

.WORD 

.BYTE 

.BYTE 

.IF OF 

.IF DF 

.yORD 

.IFF 

.yORD 

.ENOC 

.IFF 

.IF OF 

.WORD 

.IFF 

.WORD 

.ENOC 

.ENDC 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 



.IF 

.WORD 

.ENOC 

.WORD 

.WORD 

.BYTE 

.BYTE 

.IF OF 

.IF OF 

.WORD 

.IFF 

.WORD 

.ENOC 

.IFF 

.IF DF 

.WORD 

.IFF 

.WORD 

.ENDC 

.ENDC 

.WORD 

.WORD 

.WORD 

.WORD 

.WORD 



.DC9 
.-2 

UC.ALG.'UC.NPR'.I.US.NNT 

0,0 

ASSNSI 

DSSIAG 

DV.REC!DV.SQD!DV.F11 IDV.MNTIDV.UMD 

DV.REC!DV.SQD!DV.F11 !DV.MNT 



DSSIAG 
DV.REC!DV.SQD!DV.Um 



DV.REC!DV.SOD 







512. 

SMTO 

0.0,0.0.0.0 



DF MSSnUP 




.DC9 
.-2 

UC.AL6!UC.NPR:1,US.NNT 

1.0 

ASSNSI 

DSSIAG 

DV.REC!DV.S00!0V.F11:DV.NNT!DV.U«0 

DV.REC!DV.SOD!DV.ni!DV.MNT 



DSSIAG 
OV.REC!DV.SQD!DV.UW 

DV.REC.'DV.SQD 





J 

512. 

SMTO 

0.0,0.0,0.0 



«T SCB'S 



If NDF LDSMT 



•••• J 9 **** 



r 



«,_lk«,>_W %A.AA 



&A<!e 3-1 ■ 



SYSTB MACRO HIIOB U-DEC-77 20:06 PAGE 2-18 



975 

976 

977 

978 

979 

980 

981 

982 

983 

98A 

985 

986 

987 

988 

989 

990 

991 

992 

993 

994 

995 

996 

002102 

997 

998 

999 

1000 

1001 

1002 

1003 

100A 

1005 

1006 

1007 

1008 

1009 

1010 

1011 

1012 

1013 

10U 

1015 

1016 

1017 

1018 

1019 

1020 

1021 

1022 

1023 

102« 

1025 

1026 

1027 

1028 

1029 

1050 



000324 



000224 

000226 
002056 



002056 
002056 
002062 
002064 
002066 
002070 
002072 
002074 
000000 



002124 
002126 
002130 
002132 
002134 
002136 
002140 
002142 
002144 



002146 
002146 
002150 
002152 
002154 
002156 



000224 

OOOOOOG 
000340 



000000 002056' 

240 045 

000 005 

000 000 
172522 
000000 

000000 000000 000000 



WTO: 



.ASECT 

.=224 

.IF OF 

.WORD 

.IFF 

.yORD 

.ENDC 

.WORD 

.PSECT 

.ENDC 

• IF OF 

.BYTE 

.BLKW 

.ENDC 



ESSDVC 
MTOT 

WTINT 

PR7*0 



ESSDVC IDSSIAG 

6.376 

2 



000026 
000001 



000000 

002124' 

000000 

000000 

002132' 

000000 

000000 

002140* 

000000 



002172' 
y)2160' 
124 
000 
000012 



111 
000 





.yORD 


0..-2 




.BYTE 


PR5!ERL. 224/4 




.BYTE 


0.5 




.BYTE 


0*2.0 




.WORD 


172522 




.WORD 







.WORD 


0,0.0.0 




.IF OF 


LSSDRV t MSSMCE 




.WORD 







.ENDC 






.IF OF 


nSSEXT 




.WORD 







.WORD 


10 




.WORD 







.WORD 







.BLKW 


2 




.ENDC 




S.MTCK= 


=.-SMTO 






.BLKW 


8. 


«TH«1 






• 






!C7616: 


.WORD 







.WORD 


.-2 




.WORD 





.''5152: 


.WORD 







.WORD 


.-2 




.WORD 





.C5408: 


.WORD 







.WORD 


.-2 


t 

'.DC10: 


.WORD 











.WORD 


.DC11 




.WORD 


.TIO 




.ASCII 


/Tl/ 




.BYTE 


0,0 




.WORD 


TIND-TIST 



CHANNEL CONTROL BLOCKS 



DATA t SE FOR PSEUDO DEVICES 



t*** K 9 **** 



*u»»A ■AArM.^ lAi 1 AS 



4iL-Ker_7-» nn.ru. DAr.c 3.10 



SySTB MACRO M1108 H-OEC-77 20:06 



1031 002160 
1032 

1033 002160 

1034 002162 

1035 0021 6A 

1036 002166 

1037 002170 
1038 

1039 002172 
1W.0 002172 

1041 0021 74 

1042 002176 

1043 002200 

1044 002202 

1045 002204 
1046 

1047 002204 

1048 002206 

1049 002210 

1050 002212 

1051 002214 
1052 

1053 002216 

1054 002216 

1055 002220 

1056 002222 

1057 002224 

1058 002226 

1059 002230 
1060 

1061 002230 

1062 002232 

1063 002234 

1064 002236 

1065 002240 
1066 

1067 002242 

1068 002242 

1069 002244 

1070 002246 

1071 002250 

1072 002252 

1073 002254 
1074 

1075 002254 

1076 002256 

1077 002260 

1078 002262 

1079 00^264 



1080 
1081 



002266 



1082 002266 
32270 
}2272 
32274 

1086 002276 

1087 002300 




002160* 
002146' 
002160* 
000 
000 
010000 
002172* 

002216* 
002204' 
103 
000 
000012 

002204* 
002172' 
000202' 
000 
000 
010000 
002216' 

002242' 
002230' 
103 
000 
000012 

002230' 
002216' 
000202' 
000 
000 
010000 
002242' 

002266' 
002254' 
114 
000 
000012 

002254' 
002242' 
000202' 
000 
000 
010000 
002266' 

OOOOOOG 
002300' 

000 
000012 



000 
000 



117 
000 



000 
000 



MA 
JO 



000 
000 



102 
000 



000 
000 



131 
000 



PAGE 2-19 






.TIO:: 






TIST=. 








.WORD 


.DC10 




.WORD 


.TIO 




.BrTE 


0.0 




.BYTE 


0.0 




.WORD 


DV.PSE 


TINO=. 






.0C11: 








.WORD 


.DC12 




.WORD 


.COO 




.ASCII 


/CO/ 




.BYTE 


0.0 




.WORD 


COND-COST 


•COO:: 






COST=. 








.WORD 


.DC11 




.WORD 


.TTO 




.BYTE 


0.0 




.BYTE 


0.0 




.WORD 


DV.PSE 


COND=. 






.DC12: 








.WORD 


.DC13 




.WORD 


.CLO 




.ASCII 


/CL/ 




.BYTE 


0.0 




.WORD 


CLND-CLST 


.CLO:: 






CLST=. 








.WORD 


.DC12 




.WORD 


.TTO 




.BYTE 


0.0 




.BYTE 


0.0 




.WORD 


DV.PSE 


CLND=. 






.DC13: 








.WORD 


.DC14 




.WORD 


.LBO 




.ASCII 


/LB/ 




.BYTE 


0.0 




.WORD 


LBND-LBST 


.LBO:: 






L8ST=. 








.WORD 


.DC13 




.WORD 


.DBO 




.BYTE 


0.0 




.BYTE 


0.0 




.WORD 


DV.PSE 


LBNO=. 






.DCU: 








.WORD 


$USRI8 




.WORD 


.SYO 




.ASCII 


/SY/ 




.BYiE 


0.0 




.WORD 


SYND-SYST 



.SYO:: 



*••* I 9 •««* 



H^rKn M«4i\a i/.-rtcr-'yv oA.ru. DAr.r 3.3n 



SYSTB MACRO Ml 108 U-DEC-77 20:06 PAGE 2-20 

SVST=. 



1088 


002300* 




1089 002300 


002266' 




1090 002302 


000202' 




1091 00230A 


000 


000 


1092 002306 


000 


000 


1093 002310 


010000 




109A 


002312' 




1095 






1096 






1097 






1098 






1099 






1100 


000001 







.WORD 


.DCU 




.WORD 


.DC J 




• BYTE 


0,0 




• BYTE 


0.0 




.WORD 


DV.PSE 


SYND=. 






• 


• IF or 


MSSMUP 


MSSMUP 


Tendc 





; 


.END 





*•«* n 9 **** 



I AMA»a 



kt^f^r^ Mttfttt 4 1_Ke^_W ^ft.nx Bl/;c 3-31 



S>fSTB 


MACRO Ml 108 U-OEC-77 20:06 PAGE 


SYMBOL 


TABLE 






CLNO 


= 0022A2R 


FE.NLG= 


100000 


CLST 


= 002^30R 


FE.PKT= 


000100 


CQND 


= 00221 6R 


FE.PLA= 


000020 


COST 


= 00220AR 


HURTZ: 


000074 


CTH 


= 000001 


K$SCN1= 


177546 


CTNO 


:= 000066R 


KSSCSR= 


177546 


CTST 


= 00003AR 


KSSIENs 


000115 


CtSORE 


= OOOAOO 


KSSLDC- 


000001 


DBH 


= 000001 


K$$TPS= 


000074 


D6ND 


=: 000240R 


LBND = 


002266R 


DBST 


-- 000202R 


LBST = 


002254R 


DFND 


r 000<.2AR 


MMH 


000001 


OFS' 


•- 000366R 


FWND 


001652R 


DKH 


= 000001 


MMST = 


001572R 


DKND 


> 0005A4R 


MPAR = 


172100 


DKST 


= 000506R 


MPCSR * 


177746 


DPH 


: 000001 


MTH = 


000001 


DPND 


= 000722R 


MTND = 


002020R 


DPST 


' 00066AR 


MTST = 


001762R 


OSH ' 


c 000001 


MSSCRB= 


000124 


D«») 


' 001100R 


PIRQ = 


\77772 


JSST ' 


> 001042R 


PRO = 


000000 


DTH 


« 000001 


PR1 


000040 


i)TND 


« 001270R 


PR4 = 


000200 


OTST = 


' 001226R 


PR5 « 


000240 


DV.CCL' 


« 000002 


PR6 » 


000300 


DV.CO«« 020000 


PR7 = 


000340 


UV.DIR= 


= 000010 


PS 


\7777b 


0V.F11' 


« 040000 


RS$F11= 


000001 


DV.ISP= 


' 002000 


R»»JP0» 


000000 


DV.MNT' 


= 100000 


R$SJP1= 


000001 


DV.MXOi 


' 000100 


RStJSI^ 


000001 


DV.OSP' 


c OOAOOO 


RSSKII' 


000001 


OV.PSE' 


= 010000 


RttPIU 


000001 


DV.REC' 


. 0O0OO1 


R$$X11« 


000001 


OV.SDI' 


' 000020 


Rni1N= 


000000 


OV.SQO' 


= OOOOAO 


RSi11S« 


000000 


DV.SWL> 


= 001000 


SWR « 


177570 


OV.TTV. 


' 000004 


SVND > 


00231 2R 


OV UHD« 


. 000200 


srsT = 


002300R 


OXH > 


= 000001 


StSECCc 


000000 


DXNO > 


« 00U52R 


s$tYs;< 


001000 


DXST ' 
ERL ' 


■ QOUUR 

t oooooc 


S.BMSK 
S.BMSV 


]77776 
}7777i, 


FE.CAL« 


> 000040 


S.CCB 


000026 


FE.CEX" 


> 020000 


S.CON 


000010 


FE.ORV' 


' 000010 


S.CSR 


000012 


FE.EXP" 


> 000200 


S.CTM 


000006 


FE.EXT. 


. 000001 


S.FRK 


000016 


FE.EKV. 


- 000004 


S.ITM 


000007 


FE..SI« 


■ 000400 


S.LHD 


000000 


FE.«UP« 


• 000002 


S.MPR 


000026 


FE.MXT" 


■ 040000 


S.MTCK« 


000026 G 


. ABS. 


n77?6 000 
002312 001 






ERRORS 


DETECTED: 







2-21 



S.PKT 
S.PRI 
S.RCNT 
S.ROFF 
S.STS 
S.VCT 
TIND = 
TIST = 
TPS = 
TSSAIIs 
T»$C11= 
T»»J16= 
TSSKMGx 
T»$M11= 
UC.ALG- 
UC.ATT= 
UC.KlLs 
UC.LGM* 
UC.NPR« 
UC.PWF= 
Ur.QUE= 
UMO ' 
US. ABO- 
US. BSP= 
US.BSYs 
US.CRW* 
US.DSBs 
US.ECHs 
US. FOR' 
US.FRK- 
US.LM^ 
US.MOE' 
US.MOMs 
US.MNTs 
US.OFL= 
US.OUT= 
US. PUB* 
US.PWF= 
US.RED< 
US.SHR: 
US.SPU» 
US.UMD-: 
US.WCK* 
U.ACP = 
U.ATT 
U.BUF 
U.CBf -" 
U.CNT 
U.CTl 
U.CWI 
U.CW2 
U.CU3 
U.CW4 



000014 


U.DCB 


OCOOOO 


SDXTBL^ 


• ****** GX 


000004 


U.LUIC 


177774 


SDXO 


001 51 ORG 


^77772 


U.OWN 


177776 


SMMINT: 


****** GX 


\7777l 


U.RED 


000002 


SMMTBL- 


****** GX 


000011 


U.SCB 


000020 


SMMO 


001672RG 


000005 


U.STS 


000005 


SMTINT: 


****** GX 


0021 72H 


U.ST2 


000007 


$«TTBL= 


****** GX 


0021 60R 


U.UIC = 


000052 


SMTO 


002056RG 


177564 


U.UNIT 


000006 


SUSRTB^ 


****** GX 


000001 


U.VCB = 


000034 


.CLO 


002230RG 


000001 


U2.AT.= 


000020 


.COO 


002204RG 


000001 


U2.CRT= 


002000 


.CTO 


000034RG 


000000 


U2.0H1= 


100000 


.CT1 


000066RG 


000001 


U2.DJ1= 


040000 


.C5152 


0021 32R 


000200 


U2.DZ1= 


000100 


.C5408 


0021 40R 


000010 


U2.ESC= 


001000 


.C7616 


0021 24R 


000004 


U2.HLD> 


000040 


.DBO 


000202RG 


000003 


U2.LQG= 


000400 


.DB1 


000240RG 


000100 


U2.LWC- 


000001 


.DCO 


OOOOOOR 


000020 


U2.L3S= 


000004 


.'^Cl 


0001 46R 


000040 


U2.L8S« 


010000 


.DC10 


002146R 


000000 


U2.NEC» 


004000 


.DC11 


0021 72R 


000001 


U2.PRV= 


000010 


.DC12 


00221 6R 


000002 


U2.RMT= 


020000 


.DC13 


002242R 


000200 


U2.R04> 


100000 


.DC14 


002266R 


000004 


U2.SLV» 


000200 


.DC2 


000332R 


000010 


U2.VT5- 


000002 


.DC3 


0004S2R 


000002 


U2.7CH= 


010000 


.DC4 


000630R 


000040 


VttCTRs 


000400 


.DC5 


001006R 


000002 


$CTINT« 


****** 6X 


.DC6 


001172R 


000004 


»CTTBL= 


****** ax 


.DC7 


001360R 


000002 


SCTO 


000120R6 


.DC8 


001536R 


000020 


SDaiNTe 


****** QX 


.tC9 


001726R 


000100 


tDBTBL> 


****** GX 


.DFO 


000366R6 


000001 


SDGO 


000276RG 


.DKO 


000506RG 


000001 


IDEVTB 


O00000R6 


.OKI 


000544RG 


000004 


tOFINTc 


****** GX 


.OPO 


000664RG 


000010 


»DFTBL= 


•*♦*** GX 


.DPI 


000722R6 


000002 


$DFO 


000424RG 


.DSO 


001042RG 


000001 


SDKINTs 


****** GX 


.DS1 


001100RG 


000002 


»OKTBL= 


****** GX 


.OTO 


001226ilG 


000010 


tOKO 


000602RG 


.0T1 


001 /"/ORG 


000010 


»DPINTx 


****** GJ^ 


.0X0 


001414RG 


000032 


IDPTPL= 


<i***** GX 


.0X1 


001452RG 


000022 


f^PO 


000760PG 


.LbO 


002254RG 


00002; 


$DS1NT» 


.*«♦•* GX 


.MMO 


001572RG 


000032 


$OSTBL= 


*••»*« GX 


.MCI 


001632RG 


000030 


tDSO 


001'?6RG 


.MTO 


001762RG 


000004 


tOTINT« 


****** GX 


.MT1 


002020RG 


000010 


»DTTBL« 


****** GX 


.SYO 


OOt'^OC^G 


000012 


$0T0 


OOly .-' 


.TIO 


0Ct'160RG 


couou 


»DXINT= 


****** GX 


.TlO 


000<:'0?R 


ocooit 











•••• N V •••• 



SYSTB MACRO mi 08 U-OEC-77 20 06 PAGE 2-22 
SYMBOL TABLE 

VIRTUAL MEMORY USED: 30A6 WORDS ( 12 PAGES) 
DYNAMIC MEMORY: 157AA WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:31 
C4T.20DSYSTB.SY0:CA1.30]SYSTB/-SP=C1.1]EXEMC/ML.C41.10]RSXMC. SYSTB 

2 



•••t B 10 •••• 




*••* c 10 **** 



SYSXT MACRO Ml 108 1A-DEC-77 20:07 PAGE 2 



•TITLE SYSXT 
. I DENT '08/ 



a 

A5 

46 000000 

47 000000 

48 000000 

49 000000 

50 000000 

51 000000 
52 

53 
54 



COPYRIGHT (C) 1974. 1978 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 08 

D. N. CUTLER 10-AUG-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
C. A. D'ELIA 
T. J. MILLER 

MODIFIED BY: 

T. J. MILLER 11-MAR-77 

TM075 — CLEAR I.PRM»16 ON COMPLETION OF TERMINAL I/O. 

P. WANNHEDEN 8-JUN-77 

PW001 — ADDITION OF SPECIAL INTERRUPT SAVE ROUTINE 
AND FORK ROUTINE FOR USE IN CONJUNCTION 
WITH THE CINTS DIRECTIVE. 

CALL ROUTINE WHOSE ADDRESS IS STORED IN AST BLOCK 
WHEN DEQUEUING AST BLOCK WITH A.CBL=0. 

T. J. MILLER 12-SEP-77 

TM101 — REPLACE NULL TASK WITH IDiE CODE IN EXEC. 

SYSTEM ENTRANCE, EXIT, AND PROCESSOR DISPATCHING 

MACRO LIBRARY CALLS 

.MCALL ABODFS,HDRDFS,HWDDFS,PCBDFS,TCBDFS 

.MCALL ITBDFS : PW001 

ABODFS .'DEFINE TASK ABORT CODES 

HDRDFS .-DEFINE TASK HEADER OFFSETS 

HWDDFS ;DEFINE HARDWARE REGISTERS 

PCBDFS .-DEFINE PARTITION CONTROL BLOCK OFFSETS 

TCBDFS .-DEFINE TASK CONTROL BLOCK OFFSETS 

ITBDFS .-DEFINE INTERRUPT TRANSFER BLOCX OFFSETS; PW001 

♦•-SDIRSV-DIRECTIVE SAVE 

THIS ROUTINE IS CALLED FROM DIRECTIVE LEVEL TRAP SERVICE ROUTINES. THE 
STACK DEPTH IS ♦!. THUS A SWITCH TO THE SYSTEM STACK IS ALWAYS NEC- 



*••# D 10 •••* 



SYSXT MACRO Ml 108 H-OEC-77 20:07 PAGE 2-1 



7* 

75 000000 

76 000002 

77 000006 

78 000010 



P 



82 

83 OOOOU 
8A 
5 



P 



88 000020 

89 000024 

90 000026 

91 000030 

92 000032 

93 00003A 

94 000036 
95 



ESSARY. AT THE END OF TRAP PROCESSING A RETURN IS EXECUTED TO EXIT 
FROM THE SYSTEM. 



INPUTS: 



4(SP)=PS WORD PUSHED BY TRAP. 
2(SP)=PC WORD PUSHED BY TRAP. 
0(SP)=SAVED R5 PUSHED BY 'JSR R5.$DIRSV'. 



OUTPUTS: 



REGISTER M IS PUSHED ONTO THE CURRENT STACK AND THEN A SWITCH 
TO THE SYSTEM STACK IS EXECUTED. REGISTERS R3 THRU RO ARE 
PUSHED ON THE SYSTEM STACK. THE NEW PROCESSOR PRIORITY IS 
SET, AND A CALL TO THE CALLER IS EXECUTED. 



0104A6 

005367 0000006 

001 OOA 

010677 OOOOOOG 



012706 OOOOOOG 



SDIRSV: 



:MOV 
DEC 
BNE 
MOV 



R4.-(SP) 
SSTKDP 
10S 
SP.aSHEADR 



.IF NDF MSSMGE 
MOV fSSTACK.SP 

.ENDC 



010346 
010246 
010146 
010046 

000474 



10S: 



MTPS 

MOV 

MOV 

MOV 

MOV 

CALL 

BR 



MO 

R3,-(SP) 

R2.-(SP) 

RI.-(SP) 

RO.-(SP) 

(R5) 

SDIRXT 



::SAVE REGISTER R4 
;;SET PROPER STACK DEPTH 
;;IF NE DON'T SWITCH STACKS 
;;SAVE CURRENT STACK POINTER 



;;;LOA0 SYSTEM STACK POINTER 



;; .-ALLOW INTERRUPTS 
SAVE REGISTERS R3 THRU RO 



CALL SYNCHRONOUS TRAP ROUTINE 
EXIT FROM TRAP 



13 000040 010446 

14 000042 016504 OOOOOOG 



••-SFORK-FORK AND CREATE SYSTEM PROCESS 

THIS ROUTINE IS CALLED FROM AN I/O DRIVER TO CREATE A SYSTEM PROCESS THAT 
WILL RETURN TO THE DRIVER AT STACK DEPTH ZERO TO FINISH PROCESSING. 

INPUTS: 

R5>ADDRESS OF THE UCB FOR THE UNIT BEING PROCESSED. 

OUTPUTS: 

REGISTERS R5 AND R4 ARE SAVED IN THE CONTROLLER FORK BLOCK AND 
A SYSTEM PROCESS IS CREATED. THE PROCESS IS LINKED TO THE FORK 
QUEUE AND A JUMP TO SINTXT IS EXECUTED. 

SFORK:: MOV R4,-(SP) ;SAVE REGISTER R4 

MOV U.SCB(R5),R4 .-POINT TO CONTROLLER STATUS BLOCK 



•••• E 10 *•«• 



*Mew* 



•aariin M4in> 1i._lver_'*7 'il\,ny Dkr.C 3.3 



SYSXT MACRO MHOS H-OEC-77 20:07 PAGE 2-2 



115 0000A6 10506A OOOOOOG 

116 000052 06270A 000006G 

117 000056 0126U 
118 

119 

1* 

1 

1 

1 



\ 



6 
37 000060 0105AA 



41 



153 

15A 000062 

155 000064 

156 000066 

157 000072 

158 000100 

159 00010* 

160 000110 

161 0001 U 

162 000120 



CLRB 


S.CTM(R4) 


.•DISABLE TIMEOUT 


ADD 


#S.FRK*6,RA 


.•POINT TO END OF FORK BLOCK 


MOV 


(SP>^.(R4) 


;PUT SAVED R* IN FORK BLOCK 



♦♦-$F0RK1-F0RK AND CREATE SYSTEM PROCESS 

THIS ROUTINE IS AN ALTERNATE ENTRY TO CREATE A SYSTEM PROCESS AND 
SAVE REGISTER R5. 



INPUTS: 



R4=ADDRESS OF THE LAST WORD OF A 3 WORD FORK BLOCK PLUS 2. 
R5=REGISTER TO BE SAVED IN THE FORK BLOCK. 



OUTPUTS: 



REGISTER R5 IS SAVED IN THE SPECIFIED FORK BLOCK AND A SYSTEM 
PROCESS IS CREATED. THE PROCESS IS LINKED TO THE FORK QUEUE 
AND A JUMP TO SINTXT IS EXECUTED. 



SF0RK1 : :MOV 



R5,-(RA) 



;SAVE REGISTER R5 



171 000122 012767 000230* 177764G 



**-tFORK0-FORK AND CREATE SYSTEM PROCESS 

THIS ROUTINE IS AN ALTERNATE ENTRY TO CREATE A SYSTEM PROCESS. 

INPUTS: 

R4=ADDRESS OF THE LAST WORD OF A 2 WORD FORK BLOCK PLUS 2. 

OUTPUTS: 

A SYSTEM PROCESS iS CREATED. LINKED TO THE FORK QUEUE AND A 
JUMP TO IINTXT IS EXECUTED. 



SET FORK PC 

CLEAR LINK TO NEXT FORK BLOCK 

SAVE CURRENT PROCESSOR PRIORITY 
LOCK OUT INTERRUPTS 
LINK NEW ENTRY TO OLD LAST 
SET ADDRESS OF NEW LAST 
RESTORE PROCESSOR PRIORITY 

INTERRUPT OF IDLE LOOP? 

IF CC NO 



.IF DF MSSMGE 

MOV »IDIRXT.ISTACK-24 .'FORCE DEQUEUE FROM FORK LIST 

.IFF 

MOV *SD1RXT,ISTACK-U ;FORCE DEQUEUE FROM FORK LIST 



012644 




SFORKO: :MOV 


(SP)».-(R4) 


005044 




CLR 


-(R4) 






MFPS 


-(SP) 






MTPS 


#PR7 


010477 


000002G 


MOV 


R4.aSFRKHD«2 


010467 


000002G 


MOV 


R4.fFRKHD*2 






MTPS 


(SP)* 


106267 


OOOOOOG 


ASRB 


IIDLFL 


103003 




BCC 


SINTXT 



TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM1C1 
TM101 



*••• f 10 ••*• 



MAran Mlina 1/..rvKr-77 3n.n7 OkCt 3-< 



SYSXT MACRO H1 108 U-DEC-77 20:07 PAGE 2-3 



228 



000150 



.ENOC 

.IF DF 
RETURN 



CSSINT 



**-$F0RK2-F(>RK ROUTINE FOR USE IN CONJUNCTION WITH 
THE CINTS DIRECTIVE. 



INPUT: 



RS 



POINTING TO FORK BLOCK IN ITB 



OUTPUT: 

IF THE FORK BLOCK IS ALREADY IN USE (FORK PC NON-ZERO), 

A SYSTEM PROCESS IS CREATED, LINKED TO THE FORK QUEUE AND A 

JUMP TO SINTXT IS EXECUTED. 

ELSE THE INTERRUPT IS DISMISSED (NO RETURN TO CALLER). 

IMMEDIATELY ON RETURN FROM THIS ROUTINE. THE FOLLOWING 
INSTRUCTION SHOULD BE EXECUTED: 



CLR aR3 
WHICH DECLARES THE FORK BLOCK FREE. 



»F0R<2::TST 
BNE 
MOV 
MOV 
ADD 
BR 

10$: TST 



.ENOC 



2(R5) 

10$ 

R4,6(RS) 

R5,R4 

#6,R« 

SF0RK1 

'SP)* 



FORK BLOCK ALREADY IN USE? 

Y - JUMP 

SAVE M IN FORK BLOCK 

POINT JUST AFTER 3-WORD FORK BLOCK 

CLEAR STACK 

FALL THRU TO IINTXT 



TM101 
TM101 
TM101 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 

PW001 

PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 

PW001 

PW001 
PW001 
PW001 



••-llNTXT-INTfRRUPT EXIT 

THIS ROUTINE MAY BE CALLED VIA A JMP TO EXIT F^OM AN INTERRUPT. 

INPUTS: 

0(SP)>1NTERRUPT SAVE RETURN ADDRESS. 
OUTPUTS: 

A RETURN TO INTERRUPT SAVE IS EXECUTED. 



SINTXT: rRETURN 



) 



PW001 



**** 6 10 **** 



I AmAMS aAA^KA M44Aa 1 ^ —I^K ^ — 



w m.nv BACC 3_x 



SYSXT MACRO mi08 U-OEC-77 20:07 PAGE 2-« 



**-SINTSC- INTERRUPT SAVE (INTERRUPT FROM VECTOR CONNECTED 
TO VIA CINTS DIRECTIVE). 

CALLS ISR yiTH R4 AND R5 SAVED AND: 

R5 POINTER TO FORK BLOCK IN ITB 
PRl TAKEN FROM ITB 
CONDITION CODES TAKEN FROM ITB 



SINTSC: 






10S: 



.IF DF CtSINT 



:MOV 
DEC 
BNE 

NOV 

.IF NDF 

NOV 

.IFTF 



.IFF 

MOV 
MOV 

.ENDC 



R*,-(SP) 
fSTKDP 
10$ 
SP.aSHEADR 

MtSMGE 

«SSTACK.SP 



SAVE R4 

SWITCH STACKS? 

N - JUMP 

Y - SAVE STACK POINTER 



;;;LOAD SYSTEM STACK POINTER 



:::REF LABEL 



KISAR5.-(SP) ;;;SAVE KERNEL APR 5 
X.REL-X.PSW(R5).KISAR5 ;:;MAP ISR IN KERNEL APRS 



MTPS 

INC 

CALL 


(R5)» 

RS 

a(R5)* 


;;;LOAD ISR PRIORITY 
:::SKIP OVER unused byte 
::;CALL ISR 


.IF DF 


MtSMGE 




MOV 


(SP)»,KISAR5 


;;;RESTORE KERNEL APR 5 


.ENDC 






BR 


SINTX1 


;;;EXIT FROM INTERRUPT 


.ENDC 







PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 
PW001 

pyooi 

PW001 

pyooi 

PW001 
PW001 
PU001 
PW001 

pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 

PV001 

pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 
pyooi 



••-tINTSE-INTERKUPT SAVE (ERROR LOGGING DEVICES) 

THIS ROUTINE IS CALLED FROM AN IN1ERRUPT SERVICE ROUTINE WHEN AN 
INTERRUPT IS NOT GOING TO BE IMMEDIATELY DISMISSED. REGISTER RA IS 
SAVED AND THEN LOADED WITH THE ADDRESS OF THE SCB OF THE CONTROLLER 
THAT CAUSED THE INTERRUPT. A CHECK IS THEN MADE TO SEE IF AN ERROR IS 
ALREADY IN PROGRESS. IF IT IS NOT. THEN THE CURRENT I/O ACTIVE BITMAP 
IS SAVED IN THE SCB. THE APPROPRIATE BIT IS THEN CLEARED IN THE *^T|vF 



•••• H 10 *••• 



MArDnMiina ii..nKr.77 3n-n7 okcs 7-4 



SYSXT MACRO Ml 108 H-DEC-77 20:07 PAGE 2-5 



BITMAP AND REGISTER M IS LOADED WITH THE CONTROLLER INDEX. 
INTERRUPT SAVE IS THEN EXECUTED. 



A NORMAL 



INPUTS: 



4(SP):PS UORD PUSHED BY INTERRUPT. 
2(SP)-PC WORD PUSHED BY INTERRUPT. 
0(SP)=SAVED R5 PUSHED BY 'JSR R5.$INTSE'. 
0(R5)=ADDRESS OF THE SCB OF INTERRUPTING CONTROLLER. 
2(RS)=NEU PROCESSOR PRIORITY. 



OUTPUTS: 



308 000132 

309 00013* 



010A46 
01250* 



SINTSE: 



REGISTER R4 IS PUSHED ONTO THE CURRENT STACK AND THEN LOADED 
WITH THE ADDRESS OF THE SCB OF THE CONTROLLER THAT CAUSED THE 
INTERRUPT. IF AN ERROR IS NOT IN PROGRESS. THEN THE I/O ACTIVE 
BITMAP IS SAVE IN THE SCB. THE APPROPRIATE BIT IS CLEARED IN THE 
ACTIVE BITMAP AND REGISTER RA IS LOADED WITH THE CONTROLLER 
INDEX. 



.ENABL 
:MOV 
MOV 



LS6 

R4,-(SP) 

(R5)^R* 



;;;SAVE REGISTER R« 
;;.'GET ADDRESS OF SCB 



1$: 



22 000136 
3 0OOU2 



116*0* 
000*01 



OOOOOOG 



.IF DF ESSDVC 



BITB 
BNE 
MOV 
BIC 

.ENDC 



MOVB 
BR 



#SP.EIP.S.PRI(R*) 
1» ;; 

tIOABM.S.BMSV(R*) 
S.BMSK(R*>,SIOABM 



;; ERROR IN PROGRESS? 
IF NE YES 

;;SAVE I/O ACTIVE BITMAP 
;; CLEAR APPROPRIATE BIT 



S.CON(R*).R* 
21 



;;;GET CONTROLLER INDEX 
;;;FINISH IN COMMON CODE 



•*-$INT$V-INTERRUPT SAVE 



THIS ROUTINE IS CALLED FROM AN INTERRUPT SERVICE ROUTINE WHEN AN 
INTERRUPT IS NOT GOING TO BE IMMEDIATELY DISMISSED. A SWITCH TO 
THE SYSTEM STACK IS EXECUTED IF THE CURRENT STACK DEPTH IS ♦!. WHEN 
THE INTERRUPT SERVICE ROUTINE FINISHES ITS PROCESSING, IT EITHER FORKS 
, JUMPS TO SINTXT. OR EXECUTES A RETURN. 



INPUTS: 



*(SP)>PS WORD PUSHED BY INTERRUPT. 
2(SP)«PC WORD PUSHED BY INTERRUPT, 



0(SP)«SAVED R5 PUSHED BY 'JSR R5,$INTSV'. 
0(F-- - 



(R5)=NEW PROCESSOR PRIORITY. 



OUTPUTS: 



•••* I ^0 **•* 



M&mn uiirvB Ii._r\er-'y7 an<n7 OAftC 3_A 



SYSXT MACRO MHOS U-DEC-77 20:07 PAGE 2-6 



3A8 

349 000U4 010A46 

350 0OOU6 005367 OOOOOOG 

351 000152 00100A 

352 000154 010677 OOOOOOG 
353 



357 000160 012706 OOOOOOG 



369 000164 

370 000170 
371 



042567 177776 



96 

97 000172 
598 000200 005767 
399 000204 001030 



REGISTER R4 IS PUSHED ONTO THE CURRENT STACK AND THE CURRENT 
STACK DEPTH IS DECREMENTED. IF THE RESULT IS ZERO. THEN 
A SWITCH TO THE SYSTEM STACK IS EXECUTED. THE NEW PROCESSOR 
STATUS IS SET AND A CO-ROUTINE CALL TO THE CALLER IS EXECUTED 



:SAVE REGISTER R4 

.•SWITCH STACKS? 

'IF NE NO 

•SAVE CURRENT S^ACk POINTER 



0000006 



SINTSV: 
2$: 


:M0V 
DEC 
BNE 

MOV 


R4.-{SP) 

SSTKDP 

3S 

SP.aSHEADR 




.IF NDF 


MSSMGE 




MOV 


nSTACK.SP 




.ENDC 






.IF DF 


LSSSI1 


31: 


MTPS 
CALL 

.IFF 


(R5) 
2(R5) 


3$: 


BIC 
CALL 


(R5)*,PS 
(R5) 



;;;LOAD SYSTEM STACK POINTER 



;;;LOAD NEW PRIORITY 
;;;CALL THE CALLER BACK 



;;;LOAD NEW PRIORITY 
;;;CALL THE CALLER BACK 



.ENDC 



**-$INTXT-INTERRUPT EXIT 

THIS ROUTINE IS ENTERED VIA A RETURN TO EXIT FROM AN INTERRUPT. IF THE 

STACK DEPTH IS NOT EQUAL TO ZERO. THEN REGISTERS R4 AND R5 ARE 

RESTORED AND AN RTI IS EXECUTED. ELSE A CHECK IS MADE TO SEE 

IF THERE ARE ANY ENTRIES IN THE FORK QUEUE. IF NONE. THEN R4 AND 

R5 ARE RESTORED AND AN RTI IS EXECUTED. ELSE REGISTERS R3 THRU 

RO ARE SAVED ON THE CURRENT STACK AND A DIRECTIVE EXIT IS EXECUTED. 

INPUTS: (MAPPED SYSTEM) 

06(SP)=PS WORD PUSHED BY INTERRUPT. 
04(SP)=PC WORD PUSHED BY INTERRUPT. 
02(SP)=SAVED R5. 
00(SP)=SAVED R4. 

INPUTS: (REAL MEMORY SYSTEM) 

NONE • 



$INTX1;:MTPS #PR7 

TST ISTKOP 

BNE 10) 



;L0CK OUT INTERRUPTS 
;STACK DEPTH ZERO? 
:IF NE NO 



; PW001 

;.-1 



**** J 10 **** 



«J ^*«_«9 «A.A« MAJie ^—9 



SYSXT HACRO WIIOB U-OEC-77 20:07 PAGE 2-7 



000206 005767 OOOOOOG TST SFRKHO 

000212 0OU23 BEQ 5$ 

0002H NTPS #0 

000220 0103A6 MOV R3.-(SP) 

000222 0102A6 MOV R2.-(SP) 

0O022A 010U6 MOV RI.-(SP) 

000226 0100A6 MOV RO.-(SP) 



ANYTHING IN FORK QUEUE? 
IF EQ NO 

AlLOy INTERRUPTS 
SAVE REGISTERS R3 THRU RO 



438 000230 
A39 000236 
4A0 0002A2 

441 000244 

442 000250 

443 000252 

444 000254 

445 000256 

446 000260 

447 000262 



i 



•*-$DIRXT-OIRECTIVE EXIT 

THIS ROUTINE IS CALLED VIA A JUMP TC EXIT FROM A DIRECTIVE OR TRAP 
SERVICE ROUTINE. IF THERE ARE ANY ENTRIES IN THE FORK QUEUE. THEN 
THE FIRST ENTRY IS REMOVED AND THE FORK ROUTINE IS EXECUTED. ELSE 
A CHECK IS MADE TO SEE IF REDISPATCHING OF THE PROCESSOR IS NECES- 
SARY. IF NOT. THEN REGISTERS RO THRU R5 ARE RESTORED AND AN RTI 
IS EXECUTED. ELSE THE PROCESSOR IS REOISPATCHED AND THE EXIT 
SEQUENCE IS EXECUTED AGAIN. 



INPUTS: (HAPPED SYSTEM) 

16(SP)sPS WORD PUSHED BY 
14(SP)=PC WORD PUSHED BY 
12(SP)=SAVED R5. 
10(SP)=SAVED R4. 
06(SP)=SAVED R3. 
04(SP)sSAVED R2. 
02(SP}::SAVED R1. 
00(SP)=SAVED RO. 

INPUTS: (REAL MEMORY (SYSTEM) 

06(SP)«SAVED R3. 
04(SP)sSAVED R2. 
01(SP)=SAVED R1. 
00 (SP) 'SAVED RO. 



INTERRUPT OR TRAP. 
INTERRUPT OR TRAP. 



016703 OOOOOOG 

001016 

016705 OOOOOOG 

001031 

012600 

012601 

012602 

012603 



IDIRXT::MTPS 
MOV 
BNE 
MOV 
BNE 
MOV 
MOV 
MOV 
MOV 



5S: 



#PR7 

SFRKHD.R3 

20S 

SRQSCH.RS 

40S 

(SP)+.R0 

(SP)*.R1 

(SP)t.R2 

(SP)*,R3 



451 000262 017706 OOOOOOG 



005267 OOOOOOG 



.IF NDF MStMGE 
MOV 8SHEADR.SP 
.ENDC 



455 

456 000266 



10$: INC 



tSTKDP 



.-LOCK OUT INTERRUPTS 

; ANY THING IN FORK QUEUE 

;IF NE YES 

.•SCHEDULING REQUESTED? 

;IF NE YES 

;RESTORE REGISTERS RO THRU R3 

« 

n 

:;REF LABEL 



;;; RELOAD USER STACK POINTER 



;;;INCRE«ENT STACK DEPTH 



*••* K 10 **** 



>AAr br% Mi % Aft 



ii.-Ker_77 ?n.n7 Dkr.c a.B 



SYSXT MACRO M1108 U-OEC-77 20:07 PAGE 2-8 



457 000272 01260A 

A58 000274 012605 

A59 

A60 

A61 

A62 

A63 

A6A 

A65 

A66 

A67 

A68 

A69 

470 

A71 

472 000276 

473 000276 

474 000276 

475 000276 

476 000276 

477 000276 

478 000276 

479 000276 
480 

481 

482 

483 

484 000276 000002 

485 

486 

487 

488 

491 
492 
493 
494 

495 

496 000300 011367 

497 000304 001003 

498 000306 012767 

499 000314 

500 000320 062703 



MOV 
MOV 



{SP)*.R4 
(SP)»,R5 



::;REST0RE REGISTERS R4 AND R5 



NONSENSE INTERRUPT ENTRV/EXIT 



.IF NDF ESSNSI 



IF ERROR LOGGING OF UNDEFINED INTERRUPTS IS NOT SUPPORTED. 
ALL UNUSED VECTORS POINT TO THE NONSENSE INTERRUPT ADDRESS. 



SNSO 
SNSI 
$NS2 
SNS3 
SNS4 
$NS5 
SNS6 
SNS7 



.ENDC 



$NONSI::RTI 



EXECUTE FORK ROUTINE 



FORK ROUTINES ARE ENTERED VIA A CALL WITH THE ARGUMENTS: 

; R3-ADDRESS OF THE BEGINNING OF THE FORK BL0CKt2. 

; R4=REST0REn FROM FORK BLOCK. 

; R5<cREST0RED FROM FORK BLOCK. 



OOOOOOG 20$ 
OOOOOOG 000002G 
000010 



30$: 



MOV (R3).SFRKHD 

BNE 30$ 

MOV #$FRKHD,$FRKHDt2' 

MTPS #0 

ADD «10,R3 



; REMOVE ENTRY FROM FORK QUEUE 
;IF NE MORE ENTRIES 
;;RESET FORK QUEUE LISTHEAD 
; ALLOW INTERRUPTS 
.•POINT PAST SAVED R4 



.IF OF L$SDRV(M$$MGE 



510 000324 014304 

511 000326 014305 

512 000330 
S13 



MOV 
MOV 

.IFTF 

MOV 
MOV 
CALL 



KISAR5,-(SP) 
(R3).KISAR5 



-(R3).R4 
-(R3),R5 
8-(R3) 



.•SAVE APRS 
.-MAP THE DRIVER 



RESTORE REGISTERS R4 AND R5 
CALL FORK ROUTINE 



J 



*•*• L 10 **** 



SYSXT MACRO Ml 108 U-DEC-77 20:07 PAGE 2-9 



51 A 

515 

516 

517 

518 

519 

520 

521 000332 000736 

522 

523 

52A 

525 

526 

527 00033A 

528 0003AO 

529 0003AA 

530 000346 

531 000352 
532 
533 
53A 
535 
536 
537 

538 00035A 
539 
5A0 
5A1 
5A2 

5A3 000360 
5AA 00036A 
5A5 000366 
5A6 000372 
5A7 00037A 
5A8 OOOAOO 
5A9 OOOAOA 
550 



i^ 



55A 00OA10 

555 OOOAU 

556 00OA20 

557 000A2A 

a 



.IFT 

MOV 

.ENDC 

BR 



(SP) + .KISAR5 .-RESTORE APRS 



SDIRXT 



RESCHEDULING OR POWERFAIL 



005767 OOOOOOG 
001 A03 

000726 



AOS: 



MTPS 

TST 

BEQ 

CALL 

BR 



MO 

SPWRFL 

REStH 

SPOWER 

$DIRXT 



.DSABL LSB 



RESCHEDULING REQUESTED 



005067 OOOOOOG 



01670A OOOOOOG 

001A11 

00577A 000072 

0OU06 

0O507A 000072 

012700 000020 



RESCH: CLR 



SRQSCH 



.IF NDF M$$MGE 



012701 000025 

01270A 00002A 

005765 000032 
001016 



5$: 
IDS: 



MOV 
BEQ 
TST 
BEQ 
CLR 
MOV 
CALL 

.ENDC 



MOV 
MOV 
TST 
BNE 



SHEADR.RA 
5S 

8H.GARD(RA} 
5$ 

aH.GARD(RA) 

#S.CSST.R0 

SABCTK 



;TRY EXIT AGAIN 



; .-ALLOW INTERRUPTS 

POWER FAILURE? 

IF EQ NO 

EXECUTE POWER RECOVERY ROUTINES 

TRY EXIT AGAIN 



; CLEAR SCHEDULE REQUEST 



GET ADDRESS OF CURRENT HEADER 

IF EQ NO CURRENT TASK 

STACK OVERFLOW? 

IF EQ NO 

CLEAR HEADER GUARD WORD 

SET SST ABORT-SAD STACK 

ABORT CURRENT TASK 



#T2.STP!T2.SPN!T2.WFR,R1 ;SET SUSPEND-WAITFOR MASK 
#72,STP!T2.SPN,RA .-SET SUSPEND MASK 
T.STAT(R5) ;T*SK BLOCKED? 
30$ .-IF NE YES 



.IF DF Cl$CKPtTl$BUF!AttTRP 



MOV 

BEQ 

BIT 

BEQ 

TST8 

BMI 

.IFTF 



T.ASTL(R5).R2 

20$ 

#T2.AST!T2.DST.T 

70$ 

A.CBL(R2) 

70$ 



AST QUEUED? 

IF EQ NO 

ST2(R5) .-AST IN PROGRESS OR DISABLED? 

IF EQ NO 

BUFfERED I/O REQUEST? 

IF Ml YES 



•*•* M 10 **** 



rz: 



•••^Bo ••<<na 4l_fkrf_t7 ?A.n9 BARE )_in 



SYSXT MACRO M1108 U-OEC-77 20:07 PAGE 2-10 



571 00(K26 

572 OOOA32 

573 00(K3A 
57A OOOAAO 

575 000A42 

576 000AA6 

577 000*52 

578 000/.60 

579 00OA62 

580 000A66 
581 

582 
583 
58A 
585 



589 
590 
591 
592 
593 
594 
595 
596 

18 

599 
600 

601 

602 000A70 

603 000476 

604 000502 

605 000506 
606 

607 
608 
609 
610 
611 
612 
613 
6U 
615 
616 
617 
618 
619 
620 

621 000506 

622 000510 

623 0005 U 

624 000516 

625 000520 
526 000522 
C27 000524 



030165 000034 20$: BIT 

001440 BEQ 

030465 000034 BIT 

001010 BNE 

016503 000046 MOV 

016302 OOOOOOG MOV 

036272 000004 000006 BIT 

001023 BNE 

016505 000052 30$: MOV 

001354 BNE 



Ri.T.ST2(R5) ; SUSPENDED OR IN WAITFOR? 

60$ ,IF EQ NO 

R4.T.ST2(R5) .-SUSPENDED? 

30$ ;IF NE YES 

T.PCB(R5).R3 .-GET PCB ADDRESS OF TASK PARTITION 

P.KDR(R3),R2 .-POINT TO TASK HEADER 

H.EFLM{R2).aH.EFLM+2(R2) .-WAITFOR SATISFIED? 

50$ ;IF NE YES 

T.ACTL(R5),R5 ;GET ADDRESS OF NEXT TCB 

10$ ;IF NE OKAY 



EXECUTIVE IDLE LOOP 

THE EXECUTIVE IDLE LOOP IS ENTERED WHEN THERE ARE NO RUNNABLE TASKS. 
THE NULL TCB AT THE END OF THE TASK LIST IS ALWAYS GUARANTEED TO BE 
BLOCKED. TWO FLAGS ARE SET FOR OTHER EXECUTIVE ROUTINES IN THE IDLE 
LOOP. 

1. THE ADDRESS OF THE NULL TCB (#$HEADR) IS SET INTO THE RESCHEDULE 
POINTER ($RQSCH) TO PREVENT $OIRXT FROM EVER RETURNING TO SYSTEM 
STATE WHILE THE EXEC IS IDLE. THIS FORCES EXECUTION BACK TO THE 
IDLE LOOP IN LIEU OF A REAL SCHEDULE REQUEST. 

2. AN IDLE FLAG IS SET ($IDLFL) FOR THE FORK ROUTINES TO CAUSE THEM 
TO FORCE CONTROL BACK TO $D1RXT WHEN NECESSARY TO DEQUEUE A 
FORK. (IT IS IMPOSSIBLE FOR THE IDLE LOOP TO ALWAYS RETURN TO 
$DIRXT WHEN NECESSARY BECAUSE OF A WINDOW BETWEEN THE CHECK OF 
THE FORK LIST AND THE WAIT INSTRUCTION.) 



012767 OOOUOOG OOOOOOG 
012701 OOOOOOG 
105067 OOOOOOG 



40$: 



45$: 



105241 

005767 OOOOOOG 

001003 

000001 

105021 

000771 

105011 



MOV «$headr.$rqsch 

MOV #$IDLPT.R1 
CLRB $CURPR 



.IF DF P$$P45 



.-PREVENT $DIRXT RETURN TO USER 
.-POINT TO IDLE PATTERN WORD 
; CLEAR CURRENT TASK PRIORITY 
;REF LABEL 



"TATE 



46$: 



DECB 

BGE 

MOVB 

ASLB 

RORB 

ADCB 

MOV 

.ENDC 



INCB 

TST 

BNE 

WAIT 

CLRB 

BR 

CLRB 



$lDLrT 

45$ 

#4.$IDLCT 

(R1)t 

(R1) 

-(R1) 

(RD.RO 



-(R1) 

$FRKHD 

46$ 



(RD* 

40$ 

(R1) 



.-TIME TO MOVE PATTERN? 

.-IF GE NO 

.-RESET COUNT 

;MOVE PATTERN ($IDLPT) 

;($10LPTt1) 

;($IDLPT) 

.-PUT IT WHER: it CAN BE SEEN ($IDLPT) 



.-INDICATE IN IDLE STATE ($1DLFL) 

.-FORK QUEUED SINCE LAST TIME IN $DIRXT? 

.If NE YES 

.-WAIT FOR INTERhUPT 

.RESET IDLE FLAG (SIDLFD 

i-RESer IDLE FLAG ($1DLFL) 



TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
1M101 
1M101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM'01 
TM101 
IMIOI 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 
TM101 



•••* M 10 ***• 



SYSXT MACRO M1108 U-OEC-77 20:07 PAGE 2-11 



628 000526 

629 

630 

631 

632 

633 

63A 000530 

635 

636 

637 

638 

639 

6A0 0OO53A 

6A1 

642 

6A3 

(M 

6A5 

6A6 

647 

6A8 

649 0OO53A 

650 000540 

651 000546 

652 000552 

653 000554 

654 000560 

655 000562 
656 

657 
658 
659 
660 

661 000566 

662 000572 

663 000574 

664 000576 

665 000600 

666 000602 
667 

668 
669 
670 
671 
6/2 
673 
674 
675 
676 
677 
678 
679 
680 
681 
682 
683 
684 



000640 



005365 00003''« 



•K SOIRXT :BR TO DEQUEUE FORK 
WAITFOR SATISFIED-CLEAR WAIT STATE 
50J: DEC T.ST2(R5) .-CLEAR WAITFOR STATE 



; TMIOI 
;**-1 



RESTART OR CONTINUE A TASK 



60S: 



.IFT 

CLR 

.ENDC 



R4 



:REF LABEL 



;SET FLAG TO SIGNIFY RESTART OF TASK 



012700 
116567 
016703 
001416 
020567 
001002 
000167 



016302 
010601 
012142 
012142 
012142 
012142 



000046 70S: 
000002 OOOOOOG 
OOOOOOG 

OOOOOOG 

000076 



IVH.DSW.RO .-POINT TO DIRECTIVE STAIUS WORD 

T.PRI<R5),SCURPR ;SET CURRENT TASK PRIORITY 

SHEADR.R3 ;GET ADDRESS Of CURRENT TASK HEADER 

80S .-IF EQ NO CURRENT TASK 

R5.STKTCB ;NEW TASK SAME AS CURRENT? 

73S ;IF NE NO 

130S ;N0 CONTEXT SWITCH NECESSARY 



; TMIOI 



SAVE CONTEXT OF CURRENT TASK 



000072 



75% t 



H.GARD(R3),R2 

SP.RI 

(R1)»,-(R2) 

(R1)*.-{h.^) 

(R1)».-(R2) 

(R1)*.-(R2) 



,IF DF MSSMGE 



NOV 

m 

MOV 

MFPI 

MOV 



.IFF 



(R1)*.-(R2> 

{R1)».-(R2) 

(R1)*.-(R?) 

(R1).-(R2) 

SP 

(SP)*.(R3) 



.-POINT TO HEADER GUARD WORD 

.-POINT TO SAVED RO 

;SAVE RO 

.-SAVE R1 

;SAV£ R2 

;SAVE R3 



.-SAVE R4 

.-SAVE R5 

.-SAVE PC 

'SAVE P^ 

i-GET USER STACK POINTER 

.'SAVE USER STACK POINTER IN HEADER 



r DF ESSEAE 



i 



y H.FPSA(R3),R2 

y 7is 



.-POINT TO EAE SAVE AREA 

.-IF EQ TASK DOES NOT USE EAE 



•••• B 11 ***• 



SYSXT MACRO M1108 U-DEC-77 20:07 PAGE 2-12 



685 NOV 

686 WV 

687 «0V 
688 

689 .ENDC 

690 

691 

692 

693 

69A 00060A 011063 0000A6 75$: 

695 

696 

697 

698 

609 

700 

701 

702 

703 

70« 

705 

706 

707 

708 

709 

710 

711 

712 

713 

71 A 

715 

716 

717 

718 

719 

720 STFPS 

721 SETD 

725 

726 

72/ 

72B 

729 

730 

731 .ENDC 

732 

73^ 

73i 

735 

736 

737 

738 000610 010567 OOOOOOG BOSt 

739 

740 

741 



SC,(R2)* 
AC.(R2)* 
m.(R2) 



SAVE EAE REGISTERS 



• IFTF 

nOV (R0),H.DSWtR3) .-SAVE DIRECTIVE STATUS WORD 

.IF DF F$$LPP 

MOV H.FPSA(R3),R2 .-POINT TO FLOATING POINT SAVE AREA 

BiQ 80$ :IF EO TASK DOES NOT USE FLOATING POINT 



.IF DF n$$nGE 

MOV $TKTCB,R3 ;GET TCB ADDRESS OF CURRENT TASK 
)V T.PCB(R3).R1 ;GET ADDRESS OF TASK PARTITION PCB 
P.REL(R1),KISAR6 ;«AP TO TASK PARTITION 



.IF DF P$$LAS 

ADD T.0FF(R3).KISAR6 ;ADD IN OFFSET TO TASK IMAGE 

.ENDC 

.ENDC 



kn 



(R2)* 

R0.(R2)+ 

RA.RO 

R0.(R2)t 

R5.R0 

R0.(R2)t 

R1,(R2)* 

R2.(R2)* 

R3.(R2)* 



LOAD CONTEXT OF NEW TASK 



SAVE FLOATING POINT STATUS 
SET FLOATING DOUBLE MODE 
SAVE FLOATING POINT REGISTERS 



000610 010567 0000006 

0006U 016503 000046 

QG0620 016302 OOOOOOG 

000624 010267 OOOOOOG 



MQV 



R5,$TKTCB 
T.PCB(R5).R3 
P.HDR(R3).R2 
R2,$HEADR 



SET 
GET 
GET 
SET 


ADDRESS OF 
ADDRESS OF 
ADDRESS OF 
ADDRESS OF 


NEW 
TASK 
TASK 
TASK 


TCB 

PARTITION PCS 
HEADER 
HEADER 



•*•• c 11 ***• 



SYSXT MACRO Ml 108 1A-DEC-77 20:07 PAGE 2-13 



7A2 
7A3 

7A5 
7A6 
7A7 
7A8 
7A9 
750 
751 
752 
753 
75A 
755 
756 
757 
758 

759 000630 

760 000632 

761 00063A 

762 000636 

763 0006A0 
76/> 000642 
765 0006AA 
766 

767 
768 
769 
770 
771 
772 
773 
77t, 
775 
776 
777 
77^ 
779 
780 
781 
782 
783 
78A 
785 
786 
787 
788 
789 
790 
791 
792 
793 
79A 
795 
796 
797 
798 



010201 
060001 
012120 
012120 
012120 
012120 
012120 



.IFT 

.IF OF 

NOV 

.ENDC 



MOV 
TST 
BEQ 

.IFTF 



MOV 



CSSCKPKTSSBUFiASSTRP 

RA,-(SP) .-SAVE EFFECT AST FLAG 



H.WND(R2),R4 
W.BLVR^2(RA) 
8SS 



MOV 
ADD 
MOV 
MOV 
MOV 
MOV 
MOV 


R2.R1 

RO.RI 

(R1)+,(R0)+ 

(R1)t.(R0)+ 

{R1)*.(R0)+ 

(R1)*.(R0)* 

(RI)t.(RO)* 


.IFT 




MOV 
MOV 
MOV 
MOV 
MOV 


,^UISOR0,R0 
*77i; 06, (RO) 
(RO)',(RO) 
(RO)+.(RO) 
(RO)+,(RO) 


.IF OF 


RSSEXV 


MOV 


(RO)*,(RO) 


.ENOC 




MOV 
MOV 
MOV 
MOV 
MOV 
MOV 


(RO),UISDRO*U. 
#UISAR0.R1 
/WdSARO.RO 
(R0)*,(R1)t 

(R0)*.(R1)* 
(R0)t,(R1)* 


.IF OF 


RSSEXV 


MOV 


(R0)*.(R1)* 


.ENDC 





POINT TO NUMBER OF UINDOW BLOCKS 
IS TASK MAPPED TO THE EXEC? 
IF EQ NO 



:COPY ADDRESS OF TASK HEADER 
.•POINT TO DIRECTIVE STATUS WORD 
.•RESTORE DIRECTIVE STATUS WORD 
.•RESTORE POINTER TO FCS IMPURE AREA 
.•RESTORE POINTER TO FORTRAN IMPURE AREA 
; RESTORE POINTER TO OVERLAY IMPURE AREA 
.•RESTORE PTR TO VECTOR OF IMPURE PTRS 



POINT rO USER OfSCRIPTOR REGISTER 

SETUP PRIVILEGED TASK DESCRIPTOR REGISTERS 



ALLOW FULL ACCESS TO I/O PAGE 
POINT TO USER ADDRESS REGISTER 
POINT TO KERNAL ADDRESS REGISTER 
SETUP PRIVILEGED TASK ADDRESS REGISTERS 



(RO).(RI) 



t*** D 11 «••• 



SYSXT MACRO M1108 U-DEC-77 20:07 PAGE 2-U 



MOV Hn 77600, UISARO+U 

BR 90S 

85S: MOV #UISDRO.RO 

CLR (RO)* 

CLR (RO)* 

CLR (M)* 

CLR (RO)* ; 

CLR (RO)* ; 

CLR (RO)* 

CLR (RO)* 

CLR (RO) 

90$: MOV (RA)*.-(SP) 

100$: ADD «W.BLGH,R4 

MOV -W.BL6H(RA),R3 

BEQ 115$ 

CMP -(R4).-<RA) 

MOV P.REL<R3),R0 



.-SET ADDRESS REGISTER 7 FOR I/O PAGE 

POINT TO USER DESCRIPTOR REGISTER 
CLEAR ALL USER DESCRIPTOR REGISTERS 



PUSH NUMBER OF WINDOW BLOCKS 
POINT PAST CURRENT WINDOW BLOCK 
PICK UP NEXT PCB ADDRESS 
IF EQ WINDOW IS NOT MAPPED 
POINT TO FIRST PDR ADDRESS 
PICK UP PARTITION RELOCATION BIAS 



.IF DF 

ADD 

.ENDC 



P$$LAS 
-2(R*),R0 



.-ADD IN WINDOW OFFSET 



110$: 



115$: 



MOVB 

MOVB 

MOVB 

MOVB 

MOV 

ADD 

DEC 

BGT 

MOV 

DEC 

BGT 

MOV 

MTPI 



.IF DF 

MOV 

.ENDC 



(R4)*.R1 .-POINT TO FIRST PDR 

(R4)*.R3 ;PICK UP NUMBER OF PDR'S TO LOAD 

(R«).(R1)* ;SET USER DESCRIPTOR ACCESS CODE 

#177, (RD* ;SET BLOCK LENGTH 

R0.UISAR0-UISDR0-2(R1) ;LOAD USER ADDRESS REGISTER 

#200. RO .-ADVANCE TO NEXT 4K BOUNDARY 

R3 .-ANY MORE TO LOAD? 

110$ ;IF 6T NO 

(R4)*.-(R1) .-LOAD LAST USER DESCRIPTOR REGISTER 

(SP) ;ANY MORE WINDOW BLOCKS? 

100$ ;IF GT YES 

(R2),(SP) ; LOAD USER STACK POINTER 

SP ; 



C$$CKPtT$$BUF!A$$TRP 

(SP)>,R4 ;RESrORE EFFECT AST INDICATOR 



.IFF 



.IF DF E$$EAE 



MOV H.FPSA(R2).R0 

BEQ 120$ 

CMP (R0)*.(R0)* 

MOV (RO),MQ 



.•POINT TO EAE SAVE AREA 
;IF EQ TASK DOES NOT USE EAE 
.-POINT TO SAVED MQ REGISTER 
.-RESTORE EAE REGISTERS 



••#• E 11 **** 



ptt: 



Mft#>««#« A«4 4 AA 



4i_tve^-79 ^r\.A7 &4rc ^-1K 



SYSXT MACRO Ml 108 U-OEC-77 20:07 PAGE 2-15 



900 






901 






902 000646 


016200 


000072 


903 000652 


010601 




904 000654 


0U021 




905 000656 


0U021 




906 000660 


0U021 




907 000662 


0U021 





1201: 



MOV 
MOV 

.ENDC 



• IFTF 



MOV 
MOV 



.IF OF 

ADD 

.ENDC 

.ENDC 



■(RO).AC 
•(RO).SC 



.IF DF FWLPP 

MOV H.FPSA(R2),R0 ;POINT TO FLOATING POINT SAVE AREA 

BEQ 120S :IF EQ TASK DOES NOT USE FLOATING POINT 



.IF DF MSSMGE 



T.PCB(R5),R1 ;GET ADDRESS OF TCB OF NEXT TASK 
P.REL(R1).KISAR6 ;MAP TO TASK PARTITION 



PSSLAS 

T.0FF(R5),KISAR6 ;ADO IN OFFSET TO TASK IMAGE 



TST 


IRQ)* 


SETD 




LDD 


(RO)*.RO 


LDD 


(R0)*,R1 


STD 


R1.R4 ; 


LDD 


(R0)*,R1 ; 


STD 


R1 ,R5 


LDD 


(R0)*,R1 


LDD 


(R0)t,R2 ; 


LDD 


(R0)*.R3 


LDFPS 


aH.FPSA(R2) 


.ENDC 




MOV 


H.6ARD(R2),R0 ; 


MOV 


SP.RI ; 


MOV 


-(R0).(R1)+ 


MOV 


-(R0),(R1)* 


MOV 


-(R0),(R1)* 


MOV 


-(RO).(RI)* 


.IFT 




MOV 


-(R0),(R1)» ; 


MOV 


-(R0).(R1)t 



POINT TO SAVED FLOATING POINT REGISTERS 
SET FLOATING DOUBLE MODE 
RESTORE FLOATING POINT REGISTERS 



RESTORE FLOATING POINT STATUS 



POINT TO HEADER GUARD WORD 
POINT TO CURRENT CONTEXT 
RESTORE RO 
RESTORE R1 
RESTORE R2 
RESTORE R3 



; RESTORE R4 
.'RESTORE R5 



•••ft f yy •••• 



Hkran M11AB li.-i\cr_77 ^l\,m DARC 3.1iL 



SYSXT MACRO Ml 108 U-OEC-77 20:07 PAGE 2-16 



918 

919 00066A 



130$: 






MOV 
MOV 


-(R0).(R1)+ 
-(RO).(RI) 


RESTORE PC 
RESTORE PS 


.ENDC 




REF LABEL 


.IF DF 


C$$CKPtT$$BUF!A$$TRP 


TST 
BEQ 
MOV 
ADD 
CALL 


M 

190$ 

R5.R0 

#T.ASTL,R0 

$QRMVF 


EFFECT AST? 
•IF EQ NO 
CALCULATE ADDRESS OF AST LISTHEAD 

REMOVE AST ENTRY FROM QUEUE 


.IF DF 


C$$CKPtT$$BUF 




TSTB 
BMI 


A.CBL(RI) 
210$ 


•BUFFERED I/O REQUEST? 
•IF MI YES 



.ENDC 



.ENDC 



,IF DF A$$TRP 



MOV 


R5,R4 


ADD 


*T.ST2.R« 


MOVB 


(RA).-(SP) 


BIC 


#*C<T2.STP!T2.SP 


ASL 


(SP) 


BIC 


#<T2.STP!T2.SPN! 


BIS 


(SP)*,(RA) 


BIS 


#T2.AST.(RA) 


MOV 


R1,R3 


MOV 


R3,-(SP) 


CMP 


(R3)*.(R3)+ 


MOV 


$HEADR,R4 


.IF DF 


M$$MGE 


MFPI 


SP 


MOV 


(SP)*.RO 


.IFF 




MOV 


(R«),RO 


.ENDC 





CALCULATE ADDRESS OF STATUS WORD 

COPY CURRENT EXTENSION BYTE 
!T2.WFR>,(SP) .-CLEAR ALL BUT WAIT STATE 
SHIFT INTO POSITITON FOR SAVE 
t2.WFR>*2!T2.STP!T2.SPN!T2.WFR.(R«) ; 
SAVE WAIT STATE 
SET AST IN PROGRESS 
COPY AST CONTROL BLOCK ADDRESS 
SAVE AST CONTROL BLOCK ADDRESS 
POINT TO NUMBER OF BYTES TO ALLOCATE 
POINT TO TASK HEADER 



;GET CURRENT STACK POINTER 



;GET CURRENT STACK POINTER 



*••* 6 )) *•«• 



■«&»0b^ BA* 4 AS 



^l—t^mf^ff ^A. 



HAr.c 0-17 



SYSXT MACRO NHOS U-OEC-77 20:J7 PAGE 2-17 



UOS: 



1501: 



nov 

SUB 



CALL 
BCS 

.ENDC 



NOV 

MTPl 

CALL 

MOV 

ADD 

• IFF 

MOV 
MOV 
MOV 
MOV 
MOV 
CLR 

.IFTF 

MOV 
MOV 

.IFT 

MOV 
MOV 

.IFTF 

MOV 

DEC 

BLT 

MOV 

BR 

TST 

.IFF 

MOV 

.IFT 

MFPI 
MOV 



(R3)*.R1 
R1.R0 



.IF DF ASSCHKiMSSMGE 



SACHCK 
160S 



;GET NUMBER OF BYTES TO ALLOCATE ON TASK STACK 
; CALCULATE NEW TOP OF STACK 



.-ADDRESS CHECK STACK SPACE 
.■IS CS ADDRESS CHECK FAILURE 



,IF DF NSSMGE 



RO.-(SP) 
SP 

SRELOn 
SP.R1 
#7*2. R1 



(R4),R1 

MAM) 

(R1)*.(R0)* 

(R1)».(R0)* 

(R3)+.(R0)* 

{R0)» 



(R1)*.-(SP) 
(R1),R2 



SET NEW TASK STACK POINTER 

RELOCATE AND MAP STACK ADDRESS 
CALCULATE ADDRESS OF TRAP PC 



RETRIEVE OLD TOP OF STACK 
SET NEW TASK STACK POINTER 
MOVE SAVED M 
MOVE SAVED R5 
SET AST TRAP PC 
SET AST TRAP PS 



.•SAVE PC AT TRAP 
;SAVE PS AT TRAP 



#CM0DE!PMO0E.(R1) ;SET AST TRAP PS 
(R3)*,-(R1) ;SET AST TRAP PC 



(R3)*,-(SP) 

(SP) 

1S0S 

(R3)*,(R0)* 

UOS 

(SP)* 



GET NUMBER OF PARAMETERS TO MOVE 
ANY MORE PARAMETERS TO MOVE? 
IF LT NO 
MOVE PARAMETER TO USER STACK 

CLEAN STACK 



8.DSW,(R0)t :MOVE DSW TO TASK STACK 



a#H.DSW ;CET USER DSW 
(SP)».(RO)* .-HOVE OSW TO TASK STACK 



•••• H 11 •••• 



MArnn HI in* 1/..ncr.77 3n<n7 DARE 9-111 



SYSXT HACRO Ml 108 U-OEC-77 20:07 PAGE 2-18 



1027 
1028 
1029 
1030 
1031 
1032 
1033 
103A 
1035 
1036 
1037 
1038 
1039 
1040 
10A1 
1042 
1043 
1044 
1045 
1046 
1047 
1048 
1049 
1050 
1051 
1052 
1053 
1054 
1055 
1056 
1057 
1058 
1059 
1060 
1061 
1062 
1063 
1064 
1065 
1066 
1067 
1068 
1069 
1070 
1071 
1072 
1073 
1074 
1075 
1076 
1077 
1078 
1079 
1080 
1081 
1082 
1085 



.ENDC 



MOV 

nov 

MOV 
MOV 



(SP)+.(RO)* ;MOVE PC AT TRAP TO TASK STACK 
R2,(R0)* ;MOVE PS AT TRAP TO TASK STACK 
H.EFLM(R4).(R0) .'SAVE UAITFOR MASK WORD 
H.EFLMt2(R4).H.EFSV(R4) ;SAVE UAITFOR MASK ADDRESS 



.IF DF ASSCHKiMSSMGE 



160$: 



170$: 



BR 

MOV 

CALL 

.ENDC 



MOV 



170$ 

#S.CAST.RO 

$ABCTK 



<SP)+.RO 



TAKE COMMON EXIT 
SET AST ABORT 
ABORT CURRENT TASK 



.■RETRIEVE AST CONTROL BLOCK ADDRESS 



000664 105765 000034 

000670 100002 

000672 

000676 000167 177326 

000702 012746 000230' 

000706 010100 





MOV 


A.CBL(R0).R1 


GET LENGTH OF BLOCK TO RELEASE 


PW001 




BNE 


175$ 


JUMP IF NON-ZERO 


PW001 
(>W001 




.IF OF 


M$$MGE 




PW001 
PW001 




CMP 


-(RO),-(RO) 


•ZERO - POINT TO A.KSR5 


• PW001 




MOV 


(R0)*.KISAR5 


•MAP DEQUEUE SUBROUTINE IN APR 5 


PW001 




CALL 


a(RO}« 


•CALL DEQUEUE SUBROUTINE 


PW001 
PW001 




.IFF 






PW001 
PW001 




CALL 


a-2(R0) 


•CALL DEQUEUE StJBROUTINE 


PW001 
PW001 




.ENDC 






PW001 
PW001 




BR 


200$ 


EXIT 


PW001 


175$: 


TSTB 


R1 


•LENGTH NON-ZERO? 


PW001 




BNE 


180$ 


•V - JUMP 


PW001 




SWAB 


R1 


;N - GET OFFSET TO CONTROL BLOCK ADDRESS 


PW001 




ADD 


R4.R1 


•CALCULATE ADDRESS TO STORE BLOCK AODRES 


••-3 




MOV 


RO.(RI) 
206$ 


•RESET FOR NEXT AST 






BR 


•TRY EXIT AGAIN 




180$: 


CALL 


$DEACB 


; DEALLOCATE CONTROL BLOCK 






BR 


200$ 


•TRY EXIT AGAIN 






.ENDC 








190$: 


TSTB 


T.ST2(R5) 


•TASK BEING HALTED? 






BPL 


200$ 


;IF PL NO 






CALL 


$DREXT 


•FORCE TASK EXIT 




200$: 


JMP 


$DIRXT 






210$: 


MOV 


#$DIRXT.-(SP) 


•SET RETURN ADDRESS 






MOV 


R1.R0 


•SET ADDRESS OF AST CONTROL BLOCK 





••-$F1NBF -FINISH TERMINAL INPUT BUFFERED I/O 



•••• I 11 •••• 



i«A^»#% aA^tAA 



ti-Krr_vy -in.ny a^i-.c 3_lo 



SYSXT MACRO Ml 108 U-OEC-77 20:07 PAGE 2-19 



108A 
1085 
1086 
1087 
1088 
1089 
1090 
1091 
1092 
1093 
109A 
1095 
1096 
1097 
1098 
1099 
1100 
1101 
1102 
1103 
110A 
1105 
1106 
1107 
1108 
M09 
1110 
1111 
1112 
1113 
11U 
1115 
1116 
1117 
1118 
1119 
1120 
1121 
1122 
1123 
1124 
1125 
1126 
1127 
1128 
1129 
1130 
1131 
'132 
1133 
1134 
1135 

]]^ 

1138 
1139 
1U0 



THIS ROUTINE IS CALLED TO COMPLETE A BUFFERED TERMINAL INPUT 
REQUEST THAT HAS BEEN PLACED IN THE AST QUEUE. 

INPUTS: 

RO=ADDRESS OF I/O PACKET. 

OUTPUTS: 

THE BUFFERED I/O IS TRANSFERED TO THE USER TASK AND SIOFIN 
IS CALLED TO HNISH THE I/O REQUEST. 



SFINBF; 



10S: 



.IF DF CSSCKPtTSSeUF 



:SAVNR 
MOV 
MOV 
INCB 



MOV 

BEQ 

CALL 

MOV 

MOV 

.IFTF 

MOV 
MOV 
ADD 
MOV 
MOV 
MOV 
MOV 
MOV 
TST 
MOV 

.IFT 



.IF DF 

MOV 

.IF DF 

CLR 

.ENDC 



R0.R3 

I.TCB(R3).R5 

T.I0C{R5) 



SAVE NONVOLIT'LE REGISTERS 
COPY I/O PACKET ADDRESS 
RETRIEVE TASK TCB ADDRESS 
INCREMENT OUTSTANDING 1/0 COUNT 



.IF DF MSSMGE 



I.I0SB(R3),R0 

IDS 

SRELOC 



;GET VIRTUAL ADDRESS OF I/O STATUS BLK 
:IF EQ NONE SPECIFIED 
;RELOCATE I/O STATUS BLOCK 

R1J.IOSa«2(R3) :SET RELOCATION BIAS 

R2.I.I0SBt4(R3) ;SET BU'FER ADDRESS 



I.UCB(R3),R5 

R3.R4 

#I.PRM*12.R4 

(R4).-(SP) 

(R4).R2 

-(R4).-(SP) 

(SP).-(SP) 

-(R4),R0 

-(R4) 

-(R*),R1 



GET TERMINAL UCB ADDRESS 

COPY ADDRESS OF I/O PACKET 

POINT TO INPUT BUFFER ADDRESS 

SAVE INPUT BUFFER ADDRESS 

SET ADDRESS OF INPUT BUFFER FOR COPY 

GET NUMBER OF BYTES TRANSFERED 

COPY NUMBER OF BYTES TRANSFERED 

GET FINAL I/O STATUS 

BYPASS SIZE OF USER BUFFER 

SET ADDRESS OF USER BUFFER FOR COPY 



DtSYNM 

U(R4).R1 .-GET ADDRESS OF DESCRIPTOR PCB 



RULKL 
U(R4) 



.•CLEAR LAST PARAMETER WORD 



TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 
TM075 



•••• J \\ t**« 



I 



.A «« «A.A« 



SYSXT MACRO Ml 108 U-OEC-77 20:07 PAGE 2-20 



1U1 
1U2 
1U3 
1UA 
1U5 
1U6 
1U7 
1U8 
1U9 
1150 
1151 
1152 
1153 
115A 
1155 
1156 
1157 
1158 
1159 
1160 
1161 
1162 
1163 
116A 
1165 
1166 
1167 
1168 
1169 
1170 
1171 
1172 
1173 
117A 
1175 
1176 
1177 
1178 
1179 
1180 
1181 
1182 
1183 
118A 
1185 
1186 
1187 
1188 
1189 
1190 
1191 
1192 
1193 
1194 
1^95 
1196 
1197 



20S: 



SOS: 



ADD 
NOV 
MOV 

.IFF 

MOV 

.ENDC 

.ENDC 



P.REL(R1).-(RA) 

(R4)t.KISAR6 

{R<i),R1 



CONVERT TO ACTUAL RELOCATION BIAS 

MAP TO USER BUFFER 

RELOAD USER BUFFER ADDRESS 



; TM075 



-(R4).KISAR6 :MAP TO USER BUFFER 



DEC 

BLT 

MOVB 

BR 

TST 

MOV 

CALL 

MOV 


(SP) 

30S 

(R2)».(R1)* 

20S 

(SP)* 

(SP)*,R1 

SIOFIN 

(SP)*.RO 


ANY MORE BYTES TO COPY? 
■IF LT NO 
-TRANSFER BYTE TO USER BUFFER 

•CLEAN STACK 

•SET SECOND I/O STATUS WORD 
•FINISH I/O OPERATION 
RETRIEVE ADDRESS OF INPUT BUFFER 


.IF NDF 


TSSVBF 




CMP 
MOV 


-(RO),-(RO) 
t8«.,R1 


ADJUST TO START OF BUFFER 
SET SIZE OF BLOCK TO RELEASE 


.IFF 






MOV 
TST 


-(RO).RI 
-(RO) 


•PICK UP BUFFER SIZE 
•POINT TO START OF BUFFER 


.ENDC 






CALL 
RETURN 


SDEACB 


;OEALLOCATE INPUT BUFFER 



.ENDC 

♦•-$SAVNR-SAVE NONVOLATILE REGISTERS 

THIS ROUTINE IS A CO-ROUTINE THAT SAVES REGISTERS RA AND R5. 



000710 010U6 

000712 0105A6 

0007U 016605 000004 
000720 

000722 012604 

000724 012605 
'500726 



SSAVNR::MOV 
MOV 
MOV 
CALL 
MOV 
MOV 
RETURN 



R4.-(SP) 

R5.-(SP) 

4(SP),R5 

a(SP)* 

(SP)t.R4 

(SP)>,R5 



SAVE R4 

SET RETURN ADDRESS 

RESTORE R5 

CALL THE CALLER 

RESTORE R4 

RESTORE R5 

RETURN TO ORIGINAL CALLER 



•»•• K 11 •*•♦ 



I AM*M« 



ft«A«>lk«N A«« « Att 



t^_fvr^_-77 ^f\^t\y &AAC 9...01 



SYSXT MACRO mi08 U-DEC-77 20:07 PAGE 2-21 



1198 
1199 
1200 
1201 
1202 
1203 
120A 
1205 
1206 
1207 
1208 
1209 
1210 
1211 
1212 
1213 
12U 
1215 
1216 
1217 
1218 
1219 
1220 
1221 
1222 
1223 
122A 
1225 
1226 
1227 
1228 
1229 
1230 
1231 
1232 
1233 
123A 
1235 
1236 
1237 
1238 
1239 
12A0 
1241 
1242 
1243 
1244 
1245 
1246 
1247 
1248 
1249 
1250 
1251 

\m 

1254 



••SSWSTK-SWITCH STACKS 

THIS ROUTINE IS CALLED FROM TASK LEVEL TO SWITC^^ TO ^HE SYSTEM 
STACK THUS INHIBITING TASK SWITCHING. THE CALLING lASK MUST BE 
PRIVILEGED IF RUNNING IN A MAPPED SYSTEM AND MAPPED TO THE EXEC. 
CONTROL IS PASSED HERE FROM DRDSP AFTER THE TRAP HAS OCCURED AND 
SDIRSV HAS BEEN CALLED. 



CALLING SEQUENCE: 



EMT 
.WORD 



376 
ADDR 



.-TRAP TO $EMSST IN DRDSP 
.-ADDRESS FOR RETURN TO USER STATE 



INPUTS AT THIS POINT: 

R3=ADDRESS OF PC WORD OF TRAP ON STACK * 2 

MAPPED SYSTEM: 

22(SP)=PS PUSHED BY TRAP 

20(SP)=PC PUSHED BY TRAP 

16(SP)=SAVED R5 

14(SP)=SAVED R4 

12(SP)-SAVED R3 

10(SP)rSAVED R2 

06(SP)-SAVED R1 

04 (SP) -SAVED RO 

02(SP)=RETURN ADDRESS FOR SYSTEM EXIT 

00(SP)=104376 

UNMAPPED SYSTEM: 

10(SP)=SAVED R3 
06(SP)=SAVED R2 
04(SP)=SAVED R1 
02(SP)=SAVED RO 
00(SP)=RETURN ADDRESS FOR SYSTEM EXIT 



OUTPUTS: 



THE USER IS CALLED BACK ON THE SYSTEM STACK WITH ALL REGISTERS 
PRESERVED. TO RETURN TO TASK LEVEL THE CALLER MERELY EXECUTES 
A RETURN. 



000730 105013 



tSWSTK::CLRB 



(R3) 



.IF DF MSSMGE 



MOV 
MOV 
MOV 



irKISAR6.R5 

UISAR6.(R5) 

UISAR5.-(R5) 



;SET INITIAL PS WORD 



POINT TO KERNAL APR 6 
SET UP KERNAL APR 6 
SET UP KERNAL aid s 



**** L 11 **** 



UA^Ikn >A4tAft 



4i_Krr_99 Oft. AT DArc 3_39 



SYSXT l»ACRO Ml 108 U-DEC-77 20:07 


1255 




1256 




1257 




1258 




1259 




1260 




1261 




1262 




1263 




126A 




1265 000732 


0U305 


1266 00073A 


012513 


1267 




1268 




1269 




1270 




1271 




1272 




1273 




127A 000736 


0105A6 


1275 




1276 




1277 




1278 




1279 0007A0 


0U305 


1280 0007A2 


016603 000012 


1281 0007A6 




1282 




1283 


000001 



PAGE 2-22 



.IF NDF RSSEXV 

MOV UISAR4.-(R5) 

.ENDC 

.IFTF 



.-SET UP KERNAL APR « 



MOV 
MOV 


-(R3).R5 
(R5)».(R3) 


.IFT 




MOV 


R5.(SP) 


.IFF 




MOV 


R5.-(SP) 


.ENDC 




MOV 
MOV 
CALLR 


-(R3),R5 

12(SP).R3 

a(SP)* 



.•PICK UP TRAP PC WORD 

.•SET ADDRESS FOR RETURN TO USER STATE 



;SET CALLER'S ADDRESS 



.•SET CALLER'S ADDRESS 



RESTORE R5 
RESTORE R3 
CALL THE CALLER 



.END 



*•** M 11 **** 



I -„-. 



IJ^M.»«>_9Y l/V.A'V 



bArc ^-)Y 



SYSXT 


MACRO mi 08 U-DEC-77 20:07 PAGE 


2-23 






SYMBOL 


TABLE 












W.OEL= 


000010 


H.SPRI 


000060 


RESCH 


000354R 


T.EFLG 


AS.EXT= 


OOOOOA 


H.TKVA 


000026 


R$$F11= 


000001 


T.IOC 


AS.REO= 


000001 


H.TKVL 


000030 


R$$JPO= 


000000 


T.LBN 


AS.WRT= 


000002 


H.VEXT 


000056 


R$SJP1= 


000001 


T.LDV 


A. IOC 


000003 


H.WND 


C00044 


RSSJS1- 


000001 


T.LNK 


A.LGTH= 


OOOOU 


KS$CNT= 


177546 


RSSK11= 


000001 


T.MXSZ 


A.MPCT 


000011 


Kt$CSR= 


177546 


R$$P11= 


000001 


T.NAM 


A.PCB 


000012 


KS$IEN= 


000115 


R$$X11= 


000001 


T.NCRE= 


A.PCBL 


000000 


K$$LDC= 


000001 


RSS11M= 000000 


T.NCWF= 


A.PRl 


000002 


K$$TPS= 


000074 


RW11S= 


000000 


T.NDH0= 


A.STAT 


000010 


nPAR = 


172100 


SWR = 


177570 


T.NONR- 


A.TCB 


000004 


MPCSR = 


177746 


S$SECC= 


000000 


T.NDSE= 


A.TCat 


000006 


nSSCRBs 


000124 


SS$YSZ= 


001000 


T.NLDN= 


C$$ORE= 


000400 


PIRQ = 


M1777 


S.CAB0= 


000024 


T.NLUP= 


FE.CAL= 


000040 


PRO = 


000000 


S.CAST= 


000022 


T.OFF 


FE.CEX= 


020000 


PR1 = 


000040 


S.CBPT= 


000004 


T.PCB 


FE.DRV= 


000010 


PR4 = 


000200 


S.CCRF= 


000030 


T.PRI 


FE.EXP= 


000200 


PR5 = 


000240 


S.CEMT= 


000012 


T.RCVL 


FE.EXT= 


000001 


PR6 = 


000300 


S.CFLT= 


000016 


T.RRFL 


FE.EXV= 


000004 


PR7 = 


000340 


S.CILIs 


000010 


T.SRCT 


FE.LSI= 


000400 


PS 


177776 


S.CI0T= 


000006 


T.STAT 


FE.MUP= 


000002 


PS. APRS 


000007 


S.CLRFr 


000026 


T.ST2 


FE.MXTr 


040000 


PS.CHX= 


010000 


S.C0AD= 


000000 


T.ST3 


FE.NLGs 


100000 


PS.CICP= 


040000 


S.CON = 


****** Gx 


T.TCBL 


FE.PKT* 


000100 


PS.CKRs 


020000 


S.CSGF= 


000002 


T.UCB 


FE.PLA= 


000020 


PS.tOM= 000200 


S.CSST= 


000020 


T2.AB0= 


H»$RTZ= 


000074 


PS.DEL= 


000010 


S.CTM = 


****** 6X 


T2.AST= 


H.CSP 


000000 


PS.DRV= 


000020 


S.CTRP= 


000014 


T2.BFX= 


H.CUIC 


000010 


PS.FXD^ 


004000 


S.FRK = 


****** GX 


T2.CAF= 


H.DSW 


000046 


PS.L10= 


001000 


S.IOMG:: 


000032 


T2.CHK= 


H.DUIC 


000012 


PS.NSF= 


000400 


S.PRTV= 


000034 


r2.CICD= 


h.EFL« 


000004 


PS.OUTs 


100000 


TPS = 


177564 


T2.DST= 


H.EFSV 


000040 


PS.PERs 


002000 


TS.BLK= 


170700 


T2.FXD= 


H.FCS 


000050 


PS.PIC= 


000100 


TS.CKPs 


000200 


T2.HLT= 


H.FORT 


000052 


PS.SYS= 


000040 


TS.CKRs 


000100 


T2.SPN= 


H.FPSA 


000042 


P. BUS 


000016 


TS.EXE= 


100000 


T2.STP= 


H.FPVA 


000034 


P. BUSY 


000024 


TS.MS6" 


020000 


T2.TI0= 


H.GARD 


000072 


P.HDR = 


*«•♦•• 6X 


TS.NRP= 


010000 


T2.WFR: 


H.HDLN 


000002 


P. IOC 


000003 


TS.OUTs 


000400 


T3.ACP= 


H.IPC 


000016 


P.LNK 


000000 


TS.RONe 


040000 


T3.CAL= 


H.IPS 


000014 


P. MAIN 


P00012 


TS.RUNe 


004000 


T3.CLI= 


H.ISP 


000020 


P.NAM 


000004 


TSSAII:: 


000001 


T3.MCR= 


H.LUN 


000076 


P. OWN 


000026 


TIIC11= 


000001 


T3.NET= 


H.NLUN 


000074 


P.PRl 


000002 


T$SJl6c 


000001 


T3.NS0= 


H.NML 


000061 


P.REL 


000014 


TSSKMG= 


000000 


T3.PM0= 


M.OOVA 


000022 


P. SIZE 


000016 


TSSMIIr 


000001 


T3.PRV= 


H.OOVL 


000024 


P.STAT 


000030 


T.ACTL 


000052 


T3.REM3 


H.OVLV 


0000*4 


P. SUB 


000010 


T.ASTL 


000016 


T3.R0V= 


H.PFVA 


000032 


P.SUSZ 


000022 


T.ATT 


000054 


T3.RST= 


H.RCVA 


000036 


P.TCB 


000026 


T.CPCB 


000004 


T3.SLV= 


H.RRVA 


000062 


P. WAIT 


000020 


T.DPRl 


000040 


U.SCB = 


. ABS. 


000102 000 
000750 001 












ERRORS 1 


)ETECT£0: 













000022 


V$$CTR= 


000400 


000003 


U.BATT 


000006 


000041 


U.BFPD 


000014 


000044 


W.BHVR 


000004 


000000 


U.BLGH 


000020 


000050 


W.BLPD 


000016 


000006 


U.BLVR 


000002 


000006 


W.BNPD 


000015 


000004 


U.BOFF 


000012 


000010 


W.BPCB 


000000 


000000 


y.BSIZ 


000010 


000002 


X.DSI 


000022 


OOOOU 


X.FORK 


000012 


000016 


X.ISR 


000010 


000060 


X.JSR 


000002 


000046 


X.LNK 


000000 


000002 


X.PSW 


000006 


000012 


X.TCB 


000024 


000064 


$ABCTK= 


****** GX 


000063 


$CURPR= 


****** GX 


000032 


SDIRSV 


OOOOOORG 


000034 


SDIRXT 


000230RG 


000036 


$DREXT= 


****** GX 


000030 


SFORK 


000040RG 


000026 


SFORKO 


000062RG 


000100 


SFORKI 


000060RG 


100000 


$FRKHD= 


****** GX 


004000 


SHEADR: 


****** GX 


000400 


$IOLFL= 


****** GX 


020000 


I1DLPT= 


****** GX 


010000 


SINTSE 


0001 32RG 


040000 


SINTSV 


0001 44RG 


002000 


SINTXT 


0001 30RG 


000200 


SINTXI 


0001 72RG 


000004 


SNONSI 


000276RG 


000020 


SNSO 


000276RG 


001000 


SNS1 


000276RG 


000001 


SNS2 


000276RG 


100000 


$NS3 


000276RG 


000100 


$NS4 


000276RG 


001000 


SNS5 


000276RG 


004000 


SNS6 


000276RG 


000020 


$NS7 


000276RG 


000200 


$POWER= 


****** GX 


040000 


$PWRFL= 


****** GX 


010000 


SRQSCH= 


****** GX 


020000 
000040 


ISAVNR 


00071 ORG 


SSTAC<= 


*•»*•• GX 


000400 


»STICDP= 


****** GX 


002000 


SSWSTIC 


00073ORG 


•♦•*•♦ GX 


$TKTCB= 


♦*«*** GX 



VIRTUAL MEMORY USED: 4863 WORDS 19 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PACES) 



•••• N 11 •♦♦• 



SYSXT MACRO Ml 108 U-DEC-77 20:07 PAGE 2-2A 
SYMBOL TABLE , 

CAl,20]SYSXr"SY0:CAli30]SYSXT/-SP=C1.1]EXEMC/ML,C41.10]RSXMC.C11,10]SYSXT 

z 



••*• g 12 •••* 




••*• c 12 **** 



SYTAB MACRO M1108 U-DEC-77 20:07 PAGE 2 



1 
2 
3 
A 
5 
6 
7 
8 
9 
10 
11 
12 
13 
H 
15 
16 
17 
18 
19 
20 
21 
22 
23 
2A 
25 
26 
27 
28 
29 
30 
31 
32 
33 
3A 
35 
36 
37 
38 
39 
AO 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 



.TIRE SYTAB 
. IDENT /06/ 



COPYRIGHT (C) 1974. 1978 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 06 

H. LEV 23-AUG-75 
PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
T. J. MILLER 



MODIFIED BY: 

T. J. MILLER 31-JUL-77 

TM115 — MODIFY LOADER TCB FOR LB: 

SYSTEM TABLES NEEDED TO BOOTSTRAP SYSTEM AND FOR RESIDENT TASKS 

MACRO LIBRARY CALLS 

.IF NDF LtSLDRftRSSIIS 



.MCALL HWDDFS.PCBDFS.TCBDFS 



HWDDFS 
PCBDFS 
TCBDFS 



LOCAL DATA 

LOADER TASK HEADER 



DEFINE HARDWARE REGISTERS 

DEFINE TASK CONTROL BLOCK OFFSETS 



.LDRHD::.BLKW 
.WORD 
.BLKW 
.BYTE 
.BYTE 



1 

SPCBS-.LDRHD 

2 

1.1 

1.1 



.IF DF MSSMGE 

.WORD 170000 
.Iff 

.WORD 



;H.CSP-CURRENT STACK POINTER 
;H.HDLN-HEADER LENGTH IN BYTES 
;H.EFLM-EVENT FLAG MASK WORD AND ADDRESS 
;H.CUIC-CURRENT TASK UIC 
;H.0U1C-DEFAULT TASK UIC 



;H. IPS-INITIAL PROCESSOR STATUS WORD 



;H. IPS-INITIAL PROCESSOR STATUS WORD 



•tft* D 12 **** 



SYTAB MACRO Ml 108 U-OEC-77 20:07 PAGE 2-1 



58 
59 
60 
61 
62 
63 
6A 
65 
66 
67 
68 
69 
70 
71 
72 
73 
7A 
75 
76 

•n 

78 

79 

80 

81 

82 

83 

8A 

85 

86 

87 

88 

89 

90 

91 

92 

93 

9A 

95 

96 

97 

98 

99 

100 

101 

102 

103 

104 

105 

106 

107 

108 

109 

110 

111 

112 

113 

1U 



,IFTF 



10$: 



20$: 



30$: 



.WORD 


$LOADR 


.WORD 


20$ 


.WORD 


1 


.WORD 


$PCBS 


.WORD 


2 


.WORD 


117777 


.BLKW 


1 


.BLKW 


1 


.BLKW 


1 


.BYTE 


UISDR5 


.BYTE 


1 


.WORD 





.WORD 


10$ 


.BLKW 


1 


.BLKW 


9. 


.WORD 


30$ 


.WORD 


1 


.WORD 


.SYO 


.WORD 





.IFT 




.BLKW 


A 


.IFTF 




.BLKW 


A 


.WORD 






H.IPC-INITIAL PROGRAM COUNTER 
H. ISP-INITIAL STACK POINTER 
H.ODVA-NUMBER OF WINDOW BLOCKS 
H.ODVL-W.BPCB-PARTITION CNTRL BLK ADDR 
H.TKVA-W.BLVR-LOW VIRTUAL ADDRESS 
H.TKVL-°W.BHVR-HI6H VIRTUAL ADDRESS 
H.PFVA-W.BATT-ATTACHMENT DESCR ADDRESS 
H.FPVA-W.BSIZ-WINDOW SIZE 
H.RCVA-W.BOFF-OFFSET IN PARTITION 
H.EFSV-W.BFPD-FIRST USER PDR 
H.EFSVi-1-W.BNPD-NUMBER OF PDR'S 
H.FPSA-W.BLPD-CONTENTS OF LAST PDR 
H.WND-POINTER TO NUMBER OF WINDOW BLKS 
H.DSW-DIRECTIVE STATUS WORD 
H.FCS THRU H.GARD-2-LOADER'S STACK 
H.GARD-POINTER TO HEADER GUARD WORD 
H.NLUN-NUMBER OF LUNS 
UCB POINTER FOR FIRST LUN 
WINDOW POINTER FOR FIRST LUN 



;SAVE AREA FOR RA.RS.PC.PS 



;SAVE AREA FOR R0.R1.R2,R3 
.■HEADER GUARD WORD 



LOADER PARTITION CONTROL BLOCK 



$PCBS:: .WORD 
.BYTE 
.BYTE 
.RAD50 
.WORD 
.WORD 
.WORD 




2A8. 



/LDR/ 





$PCBS 


.IFT 




.WORD 





.IFF 




.WORD 


.LDRHD 


.IFTF 




.BLKW 
.WORD 
.WORD 


A 

$srD 





P.LNK-LINK TO NEXT PARTITION PCB 

P.PRl-PRIORITY 

P.IOC-I/0 COUNT 

P.NAM-FIRST WORD OF PARTITION NAME 

P.NAM*2-SEC0ND WORD OF PARTITION NAME 

P. SUB-SUBPARTITION LINK 

P. MAIN-LINK TO MAIN PARTITION 



;P.REL-RELOCATION BIAS OF PARTITION 
;P.HDR-POINTER TO LOADER HEADER 



.•P.SIZE THRU P. BUSY-UNUSED 
;P.TCB-LOA0ER TCB ADDRESS 
;P.STAT-PARTITION STATUS 



•*•* E 12 •••♦ 



*^_l\t^_^'» 'iA.A* 



»A/^e ^—^ 



SYTAB MACRO Ml 108 U-DEC-77 20:07 PAGE 2-2 



.IFT 

.WORD 

.ENDC 



.LDRHD 



;P.H0R-POINT TO LOADER TASK HEADER 



000001 



; LOADER TASK CONTROL BLOCK 


$STD:: 




.LDR:: .WORD 





.BYTE 


248. 


•BYTE 





.WORD 


SSTD 


.RA050 


/. LDR./ 


.WORD 


0..-2 


.WORD 


0..-2 


.WORD 


0.0 


.WORD 





.WORD 


SHEADR 


.WORD 


TS.EXE 


.WORD 


T2.CHK!T2.FXD 


.WORD 


T3.PRV 


.BYTE 


248. 


.BLKB 


3 


.WORD 


.LBO 


.WORD 


SPCBS 


.WORD 





.WORD 





.IF DF 


PSSLAS 


.WORD 


0..-2 


.WORD 





.BYTE 





.BYTE 





.IF DF 


P$$SRF 


.WORD 


0,.-2 


.ENDC 




.ENDC 




.ENDC 




.END 





START OF TASK LIST 
T.LNK-UTILITY LINK WORD 
T.PRI-TASK PRIORITY 
T. IOC-TASK I/O COUNT 
T.TCB-POINTER TO THIS TCB 
T. NAN-TASK NAME 
T.RCVL-RECEIVE LISTHEAD 
T.ASTL-AST QUEUE LISTHEAD 
T.EFLG-TASK LOCAL EVENT FLAGS 
T.UCB-TI UCB ADDRESS 
T.TCBL-TASK LIST THREAD WORD 
T.STAT-BL0CKIN6 BITS 
T.ST2-STATE BITS 
T.ST3-ATTRIBUTE BITS 
T.DPRI-NONRESIDENT PARTITION COUNTER 
T. LBN-LBN OF TASK IMAGE 
T.LOV-LOAD DEVICE UCB 
T.PCB-TASK PCB ADDRESS 
T.MXSZ-MAXIMUM SIZE OF TASK IMA.GE 
T.ACTL-ACTIVE TASK LIST THREAD 



;T.ATT-ATTACHMENT DESCRIi TOR LISTHEAD 
;T. OFF-OFFSET IN TASK PAR.ITION 
; (UNUSED) 
;T.SRCT-SEND BY REF WITH EFN COUNT 



.-T.RRFL-RECEIVE BY REFERENCE LISTHEAD 



; TM115 
;»*-1 



*••• f ^2 **** 



CVT4B Mkean minft i/,.nPr-77 y(\-c\7 PAr.F P-1 



SYTAB MACRO Ml 108 1A-0EC-77 20:07 PAGE 2-3 
SYMBOL TABLE 



K$SLDC= 000001 
K$$TPS= 00007A 
MS$CRB=: 0001 2A 
R$»F11= 000001 
R$SJPO= 000000 



R$$JP1= 000001 
R$$JS1= 000001 
RSSK11= 000001 
R$$P11= 000001 
R$SX11= 000001 



CtSORE= OOOAOO 
Ht$RTZ= 00007A 
«»CNT= 1775A6 
«»CSR= 1775A6 
K»»1EN= 000115 

. ABS. 000000 000 
000000 001 
ERRORS DETECTED: 

VIRTUAL MEMORY USED: 1120 WORDS ( 5 PAGES) 
DYNAMIC MEMORY: 157AA WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:09 

CA1.20]SYTAB.SY0:CA1.30]SYTAB/-SP=C1.13EXEMC/ML.C«1.10]RSXMC.[:i1.10DSYrAB 
£) 



RS$11M= 000000 
R$$11S= 000000 

s$$Erc= 000000 

St$YSZ= 001000 
T$$A11= 000001 



T$«C11= 000001 
T$$J16= 000001 
T$$KMG= 000000 
T$$M11= 000001 
V$$CTR= OOOAOO 



•**• G 12 **** 



rrrT 




•••• H 12 •••• 



rrxcru MArtin mina 1/..r\cr.77 OCt-m DARC 9 



TDSCH MACRO Ml 108 U-OEC-77 20:07 PAGE 2 



1 

13 

U 

15 

l| 

1 

1 



33 000000 

34 000000 

35 000000 

36 000000 

37 000000 
38 



.TITLE TDSCH 
•IDENT /08/ 



COPYRIGHT (C) 197A. 1978 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 08 

D. N. CUTLER 11-AUG-73 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
C. A. D'ELIA 
T. J. MILLER 

MODIFIED BY: 

T. J. MILLER 26-MAY-77 

TM086 — MODIFY TO USE NEW EVENT FLAG SETTING ROUTINE. 

TIME DEPENDENT SCHEDULING AND DEVICE TIME OUT 

MACRO LIBRARY CALLS 



.MCALL 
CLKDFS 
HDRDFS 
HWDDFS 
TCBDFS 
PCBDFS 



LOCAL DATA 



CLKDFS.HDRDFS, HWDDFS. TCBDFS.PCBDFS 

; DEFINE CLOCK QUEUE CONTROL BLOCK OFFSET 
;PEFINE TASK HEADER OFFSETS 
; DEFINE HARDWARE REGISTERS 
iDEFINE TASK CONTROL BLOCK OFFSETS 
;DEFINE PARTITION CONTROL BLOCK OFFSETS 



t 

.IF DF RSSNDC 
i^NDCT: .WORD RSSNDC 
.ENDC 

.IF DF SSSWPCtDSSISK 
SWPCT: .WORD SSSWPC 
.ENDC 



; CLOCK TICKS TO NEXT SCHEDULE INTERVAL 



; CLOCK TICKS TO NEXT SWAPPING INTERVAL 



•••• I 12 *••• 



I „. 



MA^IkA M4 mtt 



i^_nrr-77 OA.A7 BArc 0-1 



TDSCH MACRO MHOS U-DEC-77 20:07 PAGE 2-1 



58 

59 

fiO 

61 

62 

63 

M 

65 

66 

67 

68 

69 

70 

71 

72 

73 

7A 

75 

76 

71 

78 

79 

80 

81 

82 

83 



♦♦-SCK INT-CLOCK INTERRUPT 

THIS ROUTINE IS ENTERED AS THE RESULT OF A CLOCK INTERRUPT. IINTSV 
IS CALLED TO SAVE REGISTERS R4 AND R5 AND SINTCT IS INCREMENT. IF 
THE RESULT IS NONZERO. THEN A JUMP TO SINTXT IS EXECUTED. ELSE 
A FORK IS EXECUTED SO THAT PENDING CLOCK INTERRUPTS CAN BE PRO- 
CESSED. 



000000 



$CKINT::CALL SINTSV.PR6 

.IF DF KSSU11 

MOV »3.KSSU11 
.ENDC 



000006 012704 OOOOOOG 
000012 0052U 
OOOOU 00U01 
000016 
000020 



10$: 



MOV 

INC 

BEQ 

RETURN 

CALL 



#SINTCT,R* 

(R4) 

10S 

SFORKO 



;;;SAVE REGISTERS AND SET PRIORITY 



:::ENABLE AND START TIMER 



;;;POINT TO INTERRUPT COUNT 

::: INCREMENT INTERRUPT COUNT 

;;:IF EQ FORK 

;:;EXIT FROM INTERRUPT 

;: .-EXECUTE FORK 



UPDATE ABSOLUTE AND REAL TIME OF DAY AND DATE 



88 000024 

89 000030 

90 000034 

91 000040 

92 000042 

93 000044 

94 000046 

95 000050 

96 000052 

97 000054 

98 000056 

99 000060 
100 000062 

000066 
000070 
000072 
000074 
000100 
000102 
000104 
000106 
000112 

110 000114 

111 0001?0 

112 OOOK'2 



101 
102 
103 
104 
105 
106 
107 
108 
109 



114 



000124 
000130 



012704 
012705 
012702 
005245 
024415 
101020 
005015 
020502 
101370 
005215 
103766 
014201 
116100 
010014 
005301 
001360 
032742 
001355 
005214 
000753 
005267 
001007 
012700 
011000 
001403 
005360 
000773 



000002G 
000002G 
177770G 



\77777Q 

000003 

OOOOOOG 
OOOOOOG 

000010 



UPTIM: MOV #$TKPS*2.R4 

MOV *$TTNS*2.R5 

10$: MOV #$TTNS-10.R2 

INC -(R5) 

CMP -(R4).(R5) 

BHI 20$ 

CLR (R5) 

CMP R5.R2 

BHI 10$ 

INC (RS) 

BCS 10$ 

MOV -(R2).R1 

MOVB $DYPMN-1 (R1 ) ,R0 

MOV R0.(R4) 

DEC R1 

BNE 10$ 

BIT #3,-(R2) 

BNE 10$ 

INC (R4) 

BR 10$ 

20$: INC $ASTIM 

BNE TDS 

MOV t$CLKHD.RO 

40$: MOV (RO).RO 

BEQ TDS 

DEC C.riM*2(R0) 

BR 40$ 



.POINT PAST CONVERSION VECTOR 

; POINT PAS'' CURRENT TIME VECTOR 

.POINT TO DAY 

.UPDATE A COUNTER 

.•EXCEEDED LIMIT? 

.-IF HI NO 

; RE SET COUNTER 

; CHECK FOR LAST DAY OR MONTH 

:IF HI NO 

;DAY AND MONTH ARE 1 ORIGIN 

;IF CS NOT DAY 

;GET CURRENT MONTH 

;GET DAYS FOR NEXT MONTH PLUS 1 

.•MOVE TO DAYS PER MONTH LIMIT 

.•IS CURRENT MONTH ENDING JANUARY? 

' IF NE NO 

;IS THIS A LEAP YEAR? 

;1F NE NO 

.•INCREMENT DAYS FOR FEBRUARY 

•UPDATE ABSOLUTE TIME COUNTER 

;IF NE NO OVERFLOW 

.•POINT TO CLOCK QUEUE LISTHEAO 

;GET ADDRESS OF NEXT ENTRY 

;IF EQ NO MORE IN LIST 

; ADJUST HIGH ORDER TIME 



•••ft J 12 ***• 



TDSCH NACRO Ml 108 U-OEC-77 20:07 PAGE 2-2 



115 
116 

"! 
lit 
119 

120 000132 

121 000136 

122 OOOUO 

123 OOOUA 
12A 0OOU6 

125 0001 5A 

126 000156 

127 000162 

128 000166 

129 000170 

130 000172 

131 000174 

132 000176 
133 

1J 

ll 

1 

ij 

1J 
14 

1*1 
U 
143 
1^ 

u, 

14? 



1! 

153 

154 000200 



016704 OOOOOOG 

001464 

005764 000010 

001061 

026764 OOOOOOG 000006 

103455 

011467 OOOOOOG 

116405 000002 

060507 

000406 

000417 

000416 

000400 



TIME DEPENDENT SCHEDULING 

TDS: MOV ftUND, R4 

BEQ DVOUT 

TST C.TIM*2{R4) 

BNE DVOUT 

CMP $ABTIN.C.TIM(R4) 

BLO DVOUT 

MOV (R4).$CL»(HD 

MOVB C.RQT(R4),R5 

ADD R5.PC 

10S: BR 20$ 

BR 30S 

BR 30S 

BR 15S 



GET ADDRESS OF NEXT IN QUEUE 

IF EQ NONE IN LIST 

HIGH ORDER PART NONZERO? 

IF NE YES 

.•TIME TO GO? 

IF LO NO 

REMOVE ENTRY FROM CLOCK QUEUE 

GET ENTRY REQUEST TYPE 

DISPATCH TO PROCESSING ROUTINE 

MARK TIME REQUEST 

TASK REQUEST WITH PERIODIC RESCHEDULE 

SINGLE SHOT TASK REQUEST 

SINGLE SHOT INTERNAL SUBROUTINE 



.IF DF DSSSHFtDSSYNM 

BR 15S .-SINGLE SHOT INTERNAL SUBROUTINE 

CLEAR STOP BIT AND REALLOCATE PARTITION 



MOV 

CALL 

BR 

.ENDC 



C.TCB(R4),R0 

SEXRQN 

TDS 



PICK U«» TCB ADDRESS 

CLEAR STOP BIT AND REALLOCATE PARTITION 



SINGLE SHOT INTERNAL SYSTEM SUBROUTINE (TYPE 6 OR 8) 



15S: 



163 

164 000200 



.IF DF LSSDRV t MSSMGE 

MOV KISAR5.-(SP) ;SAVE APR5 

MOV C.AR5(R4),KISAR5 ;MAP TO SYSTEM ROUTINE (DRIVER) 

.IFTF 

CALL aC.SUB(R4) ;CALL SYSTEM SUBROUTINE 

.IFT 

MOV (SP)*.KISAR5 ; RESTORE APR5 

.ENDC 

•••• K 12 •♦•• 



1 .^^.^ 



**A«kiktf^ BA* 4 n A 



4 i _i^r^_^^ '%f\.f\y B&re 0—1 



TDSCH MACRO Ml 108 U-DEC-77 20:07 PAGE 2-3 



172 

173 00020A 

174 

175 



000752 



179 000206 016A00 OOOOU 

180 000212 016401 000016 

181 000216 016A0S OOOOOA 

182 000222 

183 000226 005005 
184 
185 

H 

1 

l| 
II 



BR 



TDS 



MARK TIME REQUEST 



20$: 



MOV 

MOV 

MOV 

CALL 

CLR 



C.SRC(R4).R0 

C.0ST(R4).R1 

C.TCB(R4),R5 

SSETM 

R5 



.IF DF A$»TRP 



202 

203 000230 
204 
35 



000406 



212 000232 


016400 


000004 


213 000236 


016401 


000016 


214 000242 






215 000246 


010400 




216 000250 


122705 


000002 


217 000254 


001403 




218 000256 






219 000262 


000723 




220 000264 


016001 


000014 


221 000270 


016002 


000012 


222 000274 


010504 




223 000276 


016005 


000004 


224 000302 






225 000306 

i 


000711 





MOV 

BEQ 

MOVB 

MOV 

TST 

MOV 

MO' 

Mo; 

MOV 
MOV 
CALL 
BR 

.IFF 

BR 

.ENDC 



SCHEDULE REQUEST 



C.AST{R4),R3 
40$ 

C.EFN(R4).R2 
R4.R1 

«C.LGTH.(R4)t 

ir8.*2.(R4)* 

R3,(R4)* 

#1.(R4)» 

R2,(R4) 

SQASTT 

TDS 



40S 



30S: MOV C.TCB(R4),RC 

MOV C.UlC<R4),Ri 

CALL STSKRT 

40S: MOV R4,R0 

CMPB #C.SCH0.R5 

BEQ 50$ 

CALL SDECLK 

BR TDS 

50$: MOV C.RSI*2(R0).R1 

MOV C.RS1(R0).R2 

MOV R5.R4 

MOV C.TCB(R0).R5 

CALL $CLINS 

BR TDS 



DEVICE TIME OUT 



PICK UP EVENT FLAG MASK WORD 
PICK UP EVENT FLAG MASK ADDRESS 
PICK UP TCB ADDRESS 
SET THE EVENT FLAG 
RESE1 CLOCK BLOCK TYPE 



GET AST TRAP ADDRESS 

IF EQ NO AST SPECIFIED 

GET EFN NUMBER 

COPY ADDRESS OF CLOCK QUEUE ENTRY 

POINT TO CONTROL BLOCK LENGTH 

SET LENGTH OF AST CONTROL BLOCK 

SET BYTES TO ALLOCATE ON TASK STACK 

INSERT AST TRAP ADDRESS 

SET NUMBER OF AST PARAMETERS 

INSERT EFN AS AST PARAMETER 

QUEUE AST TO TASK 



; RELEASE CLOCK CONTROL BLOCK 



TM086 
TM086 
TM086 
TM086 
TM086 
;**-5 



GET TASK TCB ADDRESS 

GET REQUEST UK 

REQUEST TASK EXECUTION 

SET ADDRESS OF BLOCK TO RELEASE 

PERIODIC REQUEST? 

IF EQ YES 

DEALLOCATE CONTROL BLOCK 

SET HIGH ORDER PART OF TIME 
SET LOW ORDER PART OF TIME 
SET REQUEST TYPE 
SET ADDRESS OF REQUEST TASK TCB 
REINSERT ENTRY IN CLOCK QUEUE 



•*•• L 12 **** 



r::7 



ih.»Ji-«« 4A.A9 



A&«» ^— A 



TDSCH MACRO Ml 108 U 


-OEC-77 20:07 


PAGE 2-4 








229 

230 

231 000310 






• 








005767 


OOOOOOG 


DVOUT: 


TST 


$TTNS 


ONE SECOND ELAPSED? 


232 0003U 


001035 






BNE 


ROBIN 


IF NE NO 


233 000316 


012746 


OOOOOOG 




MOV 


#$SCDVT.-(SP) 


SET ADDRESS OF DEVICE TABLE SCANNING CO-ROUTINE 


234 000322 






10$: 


CALL 


a(SP)* 


GET NEXT UCB ADDRESS 


235 00032A 


103431 






BCS 


ROBIN 


IF CS END OF TABLE 


236 000326 








MIPS 


S.PRI(R4) 


;;RAISE PRIORIT" TO DEVICE LEVEL 


237 00033A 


105765 


OOOOOOG 




TSTB 


U.STS(R5) 


;;UNIT BUSY? 


238 0003AO 


100020 






BPL 


20$ 


;;IF PL NO 


239 000342 


105764 


OOOOOOG 




TSTB 


S.CTM(R4) 


;;TIMEOUT ACT/^E? 


240 000346 


001415 






BEQ 


20$ 


:;IF EQ NO 


241 000350 


105364 


OOOOOOG 




DECB 


S.CTM(R4) 


;;DECREMENT TIMEOUT COUNT 


242 000354 


001012 






BNE 


20$ 


■;;IF NE MORE TIME TO 60 


243 000356 


012700 


OOOOOOC 




MOV 


#IE,DNR*377,R0 


;;SET DEVICE TIMEOUT STATUS 


244 000362 


016301 


OOOOOOG 




MOV 


D.DSP(R3).R1 


;;GET ADDRESS OF DRIVER DISPATCH TABLE 


245 000366 


016402 


OOOOOOG 




MOV 


S.CSR(R4).R2 


:;GET ADDRESS OF DEVICE CSR 


i 








.IF OF 


L$$0RVIM$$MGE 










MOV 


KISAR5.-(SP) 


•;;SAVE APRS 


1 








MOV 


D.PCB(R3).R3 


•;;GET DRIVER PCB ADDRESS 


, > 








BEQ 


15$ 


;;IF EQ DRIVER IS PART OF EXEC 


- 








MOV 


P.REL(R3).KISAR5 


;;;MAP THE DRIVER 


If 






15$: 






» ff 








.IFTF 






257 














258 000372 


116403 


OOOOOOG 




MOVB 


S.C0N(R4}.R3 


•;;GET CONTROLLER INDEX 


259 
















60 






; 










' 






; CALL 


DRIVER 


AT TIMEOUT ENTRY POINT WITH THE ARGUMENTS: 1 




> 






f 

; 
; 


RO=DEVICE TIMEOUT STATUS 
R2-ADDRESS OF DEVICE CSR 


•lE.DNR*. 




$ 






i 


R3=C0NTR0LLER INDEX. 






i 






t 


R4SADDRESS OF THE STATUS 


CONTROL BLOCK. 




I 






i 


R5=ADDRESS OF THE UNIT C( 


3NTR0L BLOCK. 


2 


I 

69 






i 








270 000376 








CALL 


aD.VOUT(RI) 


;;;ENTER DRIVER 




1 
1 








.IFT 








• 








MOV 
.ENDC 


(SP)*,KISAR5 


;;;RESTORE APRS 


277 














278 














279 000402 






20$: 


MTPS 


«0 


;;:ALLOW INTERRUPTS 


280 000406 


000745 






BR 


10$ 


;G0 AGAIN 


i 






; EXECUTIVE LEVEL ROUND ROBIN SCHEDULING 


•••• H 12 ••♦♦ 



•AkMak.^ ftA« 4 i\A 



4i_M.»^_«9 '«A./V9 BAJ^C ^_e 



TOSCH MACRO Ml 108 U-DEC-77 20:07 PAGE 2-5 



286 00OA10 
287 
288 
289 
290 
291 
292 
?3 



ROBIN: 



;REF LABEL 




331 000*10 

I 



10$: 
20$: 

30$: 
A0$: 

50$: 



.IF DF R$$NDC 



DEC 

BNE 

MOV 

CALL 

MOV 

MOV 

MOV 

BEQ 

CMP6 

BLO 

CMF>6 

BHI 

TST 

BNE 

BIT 

BEQ 

MOV 

MOV 

BR 

TST 

BEQ 

MOV 

MOV 

MOV 

MOV 

MOV 

CMPfl 

BEQ 

MOV 

MOV 

MOV 

BR 

.ENDC 



TIME TO SCHEDULE? 

IF NE NO 

RESET CLOCK TICKS TO NEXT INTERVAL 

CAUSE A REDISPATCH OF PROCESSOR 



RNDCT 

SWAP 

«R$$NDC. RNDCT 

$DRDSE 

#$ACTHD-T.ACTL.R1 ;SET ADDRESS OF PREVIOUS ENTPY 

RI.RO ;SAVE ADDRESS OF PREVIOUS FNTRY 

T.ACTL{R0).R1 ;GET ADDRESS OF NEXT ENTRY 

SWAP ;IF EQ END OF LIST 

<im$$NDH,T.PRI(R1) .-PRIORITY IN RANGE? 

10$ :IF LO NO 

«R$$NDL.T.PRI(R1) .-PRIORITY IN RANGE? 



SWAP 

T.STAT(RI) 

30$ 

*T2.SPN!T2.WFR.T 

40$ 

RI.RO 

T.ACTL(R0).R1 

20$ 

T.ACTL(RI) 

SWAP 



IF HI NO 

TASK BLOCKED? 

IF NE YES 

ST2(R1) .-TASK IN WAITFOR OR SUSPEND? 

IF EQ NO 

SAVE ADDRESS OF LAST ENTRY 

GET ADDRESS OF NEXT ENTRY 



;NULL TASK? 

;IF EQ YES 

T.ACTL(R1),T.ACTL(R0) .-REMOVE TCB FROM TASK LIST 
R1.R2 ;SAVE ADDRESS OF TCB 

R0.R1 .-SET ADDRESS OF LAST ENTRY 

RI.RO .-SAVE ADDRESS OF LAST ENTRY 

T.ACTL(R0).R1 ;GET ADDRESS OF NEXT ENTR^ 
T.PRI(R1).T.PRI(R2) ; IN SAME PRIORITY CLASS? 



50$ 

R2.T.ACTL(R0) 

R1.T.ACTL(R2) 

R2,R0 

20$ 



IF EQ YES 

SET ADDRESS OF NEXT 'N LAST 

SET ADDRESS OF NEXT IN REMOVED ENTRY 

SET ADDRESS OF LAST ENTRY 



DISK SWAPPING ALGORITHM - REDUCE SWAPPING PRIORITY OF RESIDENT TASKS 



SWAP: 



;REF LABEL 



.IF DF C$$CKPtS$$WPCftD$$ISK 



10$: 



DEC SWPCT 

BNE 70$ 

MOV #S$$WPC, SWPCT 

MOV $PARHD.R5 



TIME TO MODIFY PRIORITY DIFFERENCES? 

IF NE NO 

RESET SWAP COUNT 

POINT TO FIRST PCS IN LIST 

REF LABEL 



*•** N 12 **** 



TOSfH WACRO W»108 U-OEC-77 20:07 PAGE 2-6 



3^3 

345 
3A6 
347 
3A8 
3A9 
350 
351 
352 
353 
354 
355 
356 
357 
358 
359 
360 
361 
362 
363 
364 
365 
366 
367 
368 
369 
370 
371 
372 
373 
374 
375 
376 
377 
378 
379 
380 
381 
382 
383 
384 
385 
386 
387 
388 
389 
390 
391 
392 
393 
394 
395 
396 



.IF DF DSSYNMBMSSMGE 



15S: 



20$ 
30S 
40$ 



50$: 

60ti 
70$: 



'i 



.IFTF 



.IFT 




#PS.SrS.P.STAT(R5) ;SYSTE« CONTROLLED PARTITION? 
30$ :IF NE YES 



P.BUSY(R5).P.BUSYt1(R5) .-PARTITION OCCUPIED? 
20$ :IF EQ NO 

#PS.C0n!PS.DRV,P.STAT(R5) .'COMMON OR DRIVER PARTITION? 
40$ ;IF NE YES 

P.TCB(R5).R4 .-PICK [}P OWNER TCB ADDRESS 
#TS.CKP!TS.CKR!TS.0UT.T.STAT(R'4) .-TASK IN MEMORY? 
40$ :IF NE NO 

P.HDR(R5).R4 .-POINT TO TASK HEADER 
H.SPRI(R4).#-S$$Wt>R .-SWAPPING PRIORITY AT MINIMUM? 
40$ ;IF LE YES 

H.SPRI(R4) ;REDUCE SWAPPING PRIORITY 
R5,P.MAIN(R5) ;IS THIS THE MAIN PARTITION? 
40$ :IF NE NO 

R5.R0 :COPY PCB ADDRESS 
$NXTSK .-REALLOCATE PARTITION 
.-REF LABEL 



#PS.SYS.P.STAT(R5) .-SYSTEM CONTROLLED PARTITION? 



60$ 

P.SUB(R5) 

50$ 

P.SUB(R5).R5 

15$ 

P.MAIN(R5).R5 



MOV (R5).R5 
BNE 10$ 



.ENDC 



IF EQ NO 

IS THERE ANOTHER SUBPARTITION? 

IF EQ NO 

POINT TO NEX) SUBPARTITION PCB 

POINT TO MAIN SYS PARTITION PCB 



POINT TO NEXT PCB IN LIST 
IF NE THERE IS ONE 
REF LABEL 



EXIT TIME DEPENDENT SCHEDULE IF THERE ARE NOT REMAINING UNPROCESSED CLOC< TICK 



000410 005367 OOOOOOG 

000414 002001 

000416 

000420 000167 177400 

000001 



TIMXT: DEC flNTCT 

BGE 10$ 
RETURN 

10$: JMP UPTIM 

.END 



ANY MORE TICKS TO PROCESS? 
IF GE YES 



J 



•••• 8 13 **•• 



TDSCH MACRO 1K1108 
SYMBOL TABLE 



U-OEC-77 20:07 PAGE l-l 



AS.DEL= 

AS.EXT= 

AS.RED= 

AS.URT= 

A. IOC 

A.LGTH= 

A.HPCT 

A.PCB 

A.PCBL 

A.PRI 

A.STAT 

A.TCB 

A.TCBL 

CSSOREs 

CARS 

CAST 

C.CSTP= 

COST 

CEFN 

CLGTH= 

CLNK 

C«RKT= 

CRQT 

CRSI 

CSCHD- 

CSRC 



SSHT= 

SUB 

SYST= 

SVTIC= 

TCB 
CTIM 
CUIC 
DVOUT 
D.DSP = 
D.VOUT* 
FE.CALr 
FE.CEX= 
FE.ORV* 
FE.EXP- 
FE.EXTs 
FE.EXVs 
FE.LS1= 
FE.«UP» 
FE.HXTs 
FE.NLG* 
FE.PKT* 



000010 
OOOOOA 
000001 
0000(J2 
000003 
OOOC>H 
000011 
000012 
000000 
000002 
000010 

oasooA 

000006 
OCOAOO 
0(X)OU 
000012 
030012 
000016 
000003 
(K)0020 
000000 
000000 
000002 
000012 
000002 
OOOOU 
OOOOOA 
000012 
000006 
000010 
000004 
000006 
000016 
00031 OR 

000040 
020000 
000010 
000200 
000001 
000004 
000400 
000002 
040000 
100000 
000100 



GX 
GX 



FE.PLA= 

H»$RTZ= 

H.CSP 

H.CUIC 

H.D5.W 

H.DIJIC 

H.ElfLH 

H.EFSV 

H.FCS 

H.FORT 

H.FPSA 

H.FPVA 

H.6ARD 

H.HJLN 

H.IPC 

H.IPS 

H.ISP 

H.LUN 

H.NLUN 

H.NML 

H.ODVA 

H.ODVL 

H.OVLy 

H.PFVA 

H.RCVA 

H.RRVA 

H.SPRI 

H.TKVA 

H.TKVL 

H.VEXT 

H.WND 

IE.DNR« 

KSSCNT- 

KStCSR- 

KSSlENc: 

KSSLDC^ 

KMTPS* 

MPAR = 

MPCSR = 

Nt$CRB= 

PIRQ = 

PRO 

PR1 = 

PR4 = 

PR5 = 

PR6 = 

PR7 = 



000020 

000074 

OOOOOC 

000010 

000046 

000012 

000004 

000040 

000050 

000052 

000042 

000034 

000072 

000002 

000016 

000014 

000020 

000076 

000074 

000061 

000022 

000024 

000054 

000032 

000036 

000062 

000060 

000026 

000030 

000056 

000044 

****** GX 

177546 

177546 

000115 

000001 

000074 

172100 

177746 

000124 

ymn 

000000 
000040 
000200 
000240 
000300 
000340 



PS 

PS.APR= 

PS.CHIC= 

PS.CKP= 

PS.CKR= 

PS.CO«= 

PS.DEL= 

PS.DRV= 

PS.FXD= 

PS.LIO= 

PS.NSF= 

PS.OUTs 

PS. PER* 

PS.PICs 

PS.SVS= 

P.BLKS 

P.BUSY 

P.IOC 

P.LNK 

P.MAIN 

P.NAM 

P.OUN 

P.PRI 

P.REL 

P. SIZE 

P.STAT 

P. SUB 

P.SWSZ 

P. TCB 

P. WAIT 

ROBIN 

R$SF11= 

RSSJPO- 

R$$JP1= 

R$$JS1: 

RSSK11:: 

R$$P11« 

RSSX11» 

RSIIIM^ 

RSS11S- 

SUAP 

SWR s 

SI$ECC= 

ss$ysz= 

S.CON = 
S.CSR = 
S.CTM = 



177776 

000007 

010000 

040000 

020000 

000200 

000010 

000020 

004000 

001000 

000400 

100000 

002000 

000100 

000040 

000016 

000024 

000003 

000000 

000012 

000004 

000026 

000002 

000014 

000016 

000030 

000010 

000022 

000026 

000020 

00041 OR 

000001 

000000 

000001 

000001 

000001 

000001 

000001 

000000 

000000 

00041 OR 

177570 

000000 

001000 

****** GX 

****** GX 

****** GX 



00010? 
00042/ 
ERRORS DETECTEk 



000 
001 



S.PRI = 

TOS 

TIHXT 

TPS = 

TS.BLK= 

TS.CICP= 

TS.CKRs 

TS.EXE= 

TS.MSG= 

TS.NRP= 

TS.0UT= 

TS.RDN= 

TS.RUN= 

T»$A11= 

T$$C11= 

T$$J16= 

wum- 

T$M11 = 

T.ACTL 

T.ASTL 

T.ATT 

T.CPCB 

T.DPRI 

T.EFLG 

T.IOC 

T.LBN 

T.LOV 

T.LNK 

T.nxsz 

T.NAM 

T.OFF 

T.PC8 

T.PRI 

T.RCVL 

T.RRFL 

T.SRCT 

T.STAT 

T.ST2 

T.ST3 

T.TCBL 

T.UCB 

T2.AB0= 

T2.AST= 

T2.BFX= 

T2.C.',F = 

T2.CHIC= 

T2.CKD= 



VIRTUAL MEMORY USED: 4507 WORDS ( 18 PAGt-S) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:20 

C41.20]TDSCM.SYO:C41,30]TDSCH/-SP»C1J3EXEMC/ML.C41,103RSXMCC1MO]TOSCH 



*•** c 13 *•*• 



****** GX 

0001 32R 

00041 OR 

177564 

170700 

000200 

000100 

100000 

020000 

010000 

000400 

040000 

004000 

000001 

000001 

000001 

000000 

000001 

000052 

000016 

000054 

000004 

000040 

000022 

000003 

000041 

000044 

000000 

000050 

000006 

000060 

000046 

000002 

000012 

000064 

000063 

000032 

000034 

000036 

000030 

000026 

000100 

100000 

004000 

000400 

020000 

010000 



T2.DST= 
T2.FXD= 
T2.HLT= 
T2.SPN= 
T2.STP= 
T2.TI0= 
T2,WFR= 
T3.ACP= 
T3.CAL= 
T3.CLI= 
T3.MCR= 
T3.NET= 
T3.NS0= 
T3.PMD= 

t:5.prv= 

TJ.REM= 

T3.R0V= 

T3.RST= 

r3.SLV= 

IJPTIM 

J.STS ■■■■ 

V$$CTR= 

W.BATT 

W.BFPD 

W.BHVFt 

W.BLGM 

W.BLPO 

W.BLVR 

W.BNPD 

W.BOFF 

W.BPCB 

W.BS.1Z 

SABTIM" 

SCKINT 

$CL][NS= 

$CLKHD= 

SDECLK= 

SDYPMNs 

$FORKO= 

$INTCT= 

$INTSV= 

$SCOVT= 

SSETM = 

STKPS = 

$TSKRT= 

STTNS = 



04C000 

oo;.'ooo 

000200 

000004 

000020 

001000 

000001 

100000 

CO0100 

001000 

004000 

000020 

000200 

040000 

010000 

020000 

000040 

000400 

002000 

000024R 

****** GX 

000400 

000006 

000014 

000004 

000020 

000016 

000002 

000015 

000012 

000000 

000010 

****** GX 

OOOOOORG 

****** GX 

****** GX 

****** GX 

****** 

****** 

****** 

****** 

****** 



****'<* 
****** 
**'«*** 



GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 
GX 




•••* D 13 **** 



CTDRV MACRO Ml 108 U-OEC-77 20:08 PAGE 2 



1 
2 
3 

A 

5 

6 

7 

8 

9 
10 
11 
12 
13 
U 
15 
16 
17 
18 
19 
20 
21 
22 
23 
2A 
25 
26 
27 
28 
29 
30 
31 
32 
33 
3A 

35 000000 

36 000000 
37 

38 

39 

AO 

41 

A2 

A3 

AA 000000 

A5 

A6 

A7 

A8 

A9 

50 

51 

n 

5A 
55 
56 
57 



.TITLE CrPRV 
, I DENT /07/ 



COPYRIGHT (C) 1974. 1978 

DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND NAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION 07 

D. N. CUTLER 13-MAR-7A 

PREVIOUSLY MODIFIED BY: 

D. N. CUTLER 
C. A. D'ELIA 
B. LYONS 

MODIFIED BY: 

P. J. BEZEREDI OA-MAR-77 

P8019 — FIX A BUG IN THE ERROR LOGGING LOGIC. 

TA11 TAPE CASSETTE CONTROLLER DRIVER 

NOTE: THIS IS A MINIMAL DRIVER AND CONTAINS NO ERROR RECOVERY. 

MACRO LIBRARY CALLS 



.MCALL HWDDFS.PKTDFf 

HWDDFS .-DEFINE HARDWARE REGISTERS 

PKTDFS .-DEFINE I/O PACKET OFFSETS 



LOCAL DATA 

CONTROLLER IMPURE DATA TABLES (INDEXED BY CONTROLER NUMBER) 



CNTBL: .BLKW TSSAH 

.IF 6T T$$A11-1 

TEMP: .BLKW 1 
.ENDC 



; ADDRESS OF CURRENT UNIT CONTROL BLOCK 



.•TEMPORARY STORAGE FOR CONTROLLER NUMBER 



ERROR PROCESSING CONTROL TABLE 



**•• E 13 ttt* 



ftA« « f^m 



a^m*<^n^ nA.Aa 



BA#^e ^_1 



CTDRV MACRO Ml 108 U- 


5EC-77 20:08 


58 000002 


OOOC 


002 


59 OOOOOA 


OOOC 


020 


60 000006 


OOOC 


OAO 


61 000010 


OOOC 


010 


62 000012 


OOOC 


OOA 


63 OOOOU 


OOOC 


377 


6A 






6$ 






66 






67 






68 






69 000016 


OOOOOOG 




70 000020 


105 


012 


71 000022 


OOOAOO' 




72 00002A 


OOOOOOG 




73 000026 


103 


012 


74 000030 


0OOA22' 




75 000032 


OOOOOOG 




76 00003A 


101 


012 


n 000036 


000A56* 




78 OOOOAO 


OOOOOOG 




79 0OOOA2 


117 


0A2 


80 00004A 


0OOA56' 




81 0O0OA6 


OOOOOOG 




82 000050 


115 


200 


83 000052 


000320' 




8A 00005A 


OOOOOOG 




85 000C56 


113 


200 


86 000060 


000320' 




87 






88 






89 






90 






91 







92 000062 

93 00006A 
9A 000066 
95 000070 
96 

97 

98 

99 
100 
101 
102 
103 



000072' 
000222' 
000522' 
000222' 



1._ 
107 

18$ 

110 
111 
112 
113 
1U 



PAGE 2-1 



ERRTB: 



.BYTE IE.DNR»377,1000/A00 .-DEVICE NOT READY 

.BYTE IE.WLKa377.10000/A&G .-DRIVE WRITE LOCKED 

.BYTE IE.E0Tft377.20000/A00 ;END OF TAPE 

.BYTE IE.EOF8377,A000/A00 ;END OF FILE 

.BYTE IE.DAO»377,2000/A00 ;DATA OVERRUN 

.BYTE IE.VERR377.377 .-BLOCK CHECK ERROR 



READ LOGICAL BLOCK 



; LEGAL FUNCTION DISPAT 


LGFCN: .WORD 


lO.RLB 


.BYTE 


105,10. 


.WORD 


RDBLK 


.WORD 


lO.WLB 


.BYTE 


103,10. 


.WORD 


WRBLK 


.WORD 


lO.EOF 


.BYTE 


101.10. 


.WORD 


WREOF 


.WORD 


lO.RWD 


.BYTE 


117, 3A. 


.WORD 


WREOF 


.WORD 


lO.SPB 


.BYTE 


115,128 


.WORD 


SPCBK 


.WORD 


O.SPF 


.BYTE 


13,128 


.WORD 


SPCBK 


; DRIVER DISPATCH TABLE 


SCTTBL::.WORD 


CTINI 


.WORD 


CTCAN 


.WORD 


CTOUT 


.WORD 


CTPWF 



WRITE LOGICAL BLOCK 
WRITE END OF FILE 
REWIND 
SPACE BLOCK 
SPACE FILE 



.-DEVICE INITIATOR ENTRY POINT 
.-CANCEL I/O OPERATION ENTRY POINT 
; DEVICE TIMEOUT ENTRY POINT 
.-POWERFAIL ENTRY POINT 



•*-CTINI-TA11 TAPE CASSETTE CONTROLLER INITIATOR 

THIS ROUTINE IS ENTERED FROM THE QUEUE I/O DIRECTIVE WHEN AN I/O REQUEST 
IS QUEUED AND AT THE END OF A PREVIOUS I/O OPERATION TO PROPAGATE THE EXECU- 
TION OF THE DRIVER. IF THE SPECIFIED CONTROLLER IS NOT BUSY, THEN AN ATTEMPT 
IS MADE TO DEQUEUE THE NEXT I/O REQUEST. ELSE A RETURN TO THE CALLER IS 
EXECUTED. IF THE DEQUEUE ATTEMPT IS SUCCESSFUL, THEN THE NEXT I/O OPER- 
ATION IS INITIATED. A RETURN TO THE CALLER IS THEN EXECUTED. 



INPUTS: 



R5=ADDRESS OF THE UCB OF THE CONTROLLER TO BE INITIATED. 



OUTPUTS: 



IF THE SPECIFIED CONTROLLER IS NOT aUSY AND AN I/O REQUEST IS WAIT- 
ING TO BE PROCESSED, THEN THE REQUliST IS DEQUEUED AND THE I/O OPER- 



•••• F 13 ••** 



J 



MA ran Mi 1 Afi 



l/_r\cr-77 on.r^B DA/tC 9.3 



CTDRV MACRO Ml 108 U-DEC-77 20:08 PAGE 2-2 



115 

118 

119 000072 

120 000076 
121 



1 
1 
1 

i!^ 

140 
Ul 
U2 

u! 

1A4 

U5 000100 
U6 000104 
U7 000110 
U8 000114 
H9 000120 

150 000122 

151 0001 2A 

152 000126 

153 000130 

154 000134 



103451 



ATION IS INITIATED. 



.ENABL LSB 
CTINI: CALL SGTPKT 
BCS CTPWF 



.-GET AN I/O PACKET TO PROCESS 

;IF CS CONTROIi.ER BUSY OR NO REQUEST 



THE FOLLOWING ARGUMENTS ARE RETURNED BY S6TPKT: 

R1=A0DRESS OF THE I/O REQUEST PACKET. 

R2=PHYSICAL UNIT NUMBER OF THE REQUEST UCB. 

R3=C0NTR0LLER INDEX. 

R4=ADDRESS OF THE STATUS CONTROL BLOCK. 

R5=ADDRESS OF THE UCB OF THE CONTROLLER TO BE INITIATED. 

TA11 TAPE CASSETTE FUNCTION INDEPENDENT I/O REQUEST PACKET FORMAT: 

WD. 00 — I/O QUEUE THREAD WORD. 

WD. 01 — REQUEST PRIORITY, EVENT FLAG NUMBER. 

WD. 02 — ADDRESS OF THF TCB OF THE REQUESTOR TASK. 

WD. 03 — POINTER TO SECOND LUN WORD IN REQUESTOR TASK HEADER. 

WO. 04 — CONTENTS OF THE FIRST LUN WORD IN REQUESTOR TASK HEADER (UC 

WD. 05 — I/O FUNCTION CODE (10. RLB 1 lO.RWD/IO.SPB/IO.SPF/IO.EOF) . 

WD. 06 — VIRTUAL ADDRESS OF I/O STATUS BLOCK. 

WD. 07 — RELOCATION BIAS OF I/O STATUS BLOCK. 

WD. 10 — I/O STATUS BLOCK ADDRESS (REAL OR DISPLACEMENT ♦ UOOOO). 

WD. 11 — VIRTUAL ADDRESS OF AST SERVICE ROUTINE. 



010563 000000' 

012703 000016' 

012700 000006 

026123 000012 

00U06 

022323 

005300 

003372 

012700 OOOOOOC 

OOOA35 



160 000136 000302 

161 000140 152302 

162 000U2 112364 OOOOOOG 

163 000146 100016 
164 



MOV 


R5.CNTBL(R3> 


SAVE ADDRESS OF REQUEST UCB 


MOV 


#LGFCN.R3 


POINT TO LEGAL FUNCTION TABLE 


MOV 


«6,R0 


SET NUMBER OF ENTRIES IM TABLE 


10$: CMP 


I.FCN(R1).(R3)* 


FUNCTION CODE MATCH? 


BEQ 


20$ 


IF EO YES 


CMP 


(R3)*,(R3)* 


POINT TO NEXT TABLE ENTRY 


DEC 


RO 


ANY MORE TABLE ENTRIES? 


BGT 


10$ 


IF GT YES 


MOV 


*IE.IFC8377,R0 


SET ILLEGAL FUNCTION STATUS 


BR 


S0$ 


FINISH IN COMMON CODE 


; FUNCTION CODE MATCH FOUND 




20$: SWAB 


R2 


SWAP UNIT NUMBER TO LEFT BYTE 


BISO 


(R3)t.R2 


MERGE FUNCTION CODE WITH UNIT 


MOVB 


(R3)+.S.ITM(R4) 


SPACING FUNCTION? 


BPL 


30$ 


IF PL NO 


* 

; SPACING FUNCTION DEPENDENT I/O PACKET FORMAT: 


; WD. 12 


~ SPACING COUNT 


( POSITIVE =FORWARD. NEGATIVE=BAC 


i WD. 13 


— NOT USED. 




t WD. 14 


— NOT USED. 




; WD. 15 


— NOT USED. 





**•• G 13 **** 






CTDRV MACRO MllOB U-DEC-77 20:08 PAGE 2-3 



177 000150 

178 000156 

179 00016A 

180 000166 

181 000170 

182 00017A 

183 000200 
ISA 

l| 
lj 

I 

11 
1^ 

198 

199 00020A 

200 000212 
201 



WO. 16 — NOT USED. 
WD. 17 — NOT USED. 
WD. 20 — NOT USED. 



016561 
016565 
0OU17 
100006 
005A65 
005A61 
162702 



OOOOOOG 000030 
OOOOOOG OOOOOOG 



OOOOOOG 

000030 

OOOOOA 



MOV 
MOV 
BEQ 
BPL 
NEG 
NEG 
SUB 



U.BUF(R5).I.PRM+A(R1) .-MOVE SPACING COUNT TO COMMON PLACE 
U.BUF(R5),U.CNT(R5) ;HOVE SPACING COUNT TO COMMON PLACE 



AOS 

30$ 

U.CNT(R5) 

I.PRM*A(R1) 

#A,R2 



IF EQ NO SPACING REQUIRED 
IF PL SPACE FORWARD 
CONVERT TO POSITIVE COUNT 
CONVERT TO POSITIVE COUNT 
CONVERT TO REVERSE FUNCTION 



READ/WRITE LOGICAL FUNCTION DEPENDENT I/O PACKET FORMAT: 

WO. 12 — RELOCATION BIAS OF DATA BUFFER. 

WO. 13 — DATA BUFFER ADDRESS. 

WO. 1A — NUMBER OF BYTES TO BE TRANSFERED. 

WD. 15 — NOT USED. 

WD. 16 — NOT USED. 

WO. 17 — NOT USED. 

WO. 20 — NOT USED. 

NO FUNCTION DEPENDENT PARAMETERS ARE REQUIRED FOR REWIND AND WRITE EOF 



116A6A 
011365 



OOOOOOG OOOOOOG 30S: 
OOOOOOG 



MOVB S.ITM(RA).S.CTM(RA) ;SET CURRENT DEVICE TIMEOUT COUNT 
MOV (R3).U.CW2(R5> ;SET INITIAL INTERRUPT ADDRESS 



.IF DF ESiiiVC 
CALL S6MSET 
.ENOC 



; SET I/O ACTIVE IN BITMAP 



?16 000216 01027A OOOOOOG 
211 

HI 

21A 

215 

216 000222 

217 



221 

22^ 000222 
225 



MOV 



R2.aS.CSR(RA) .-INITIATE FUNCTION 



CANCEL I/O OPERATION IS A NOP FOR TA11 TAPE CASSETTES. 



CTCAN: 



;REF LABEL 



POWERFAIL IS HANDLED VIA THE DEVICE TIMEOUT FACILITY AND THEREFORE CAUSES 
NO IMMEDIATE ACTION ON THE DEVICE. THIS IS DONE TO AVOID A RACE CONDITION 
THAT COULD EXIST IN RESTARTING THE I/O OPERATION. 



CTPWF: RETURN 



NO SPACING REQUIRED 



*••* H 13 **** 



Mlrnn Mima 1/.-ncr-77 ^n.na DARC 0~L 



CTDRV MACRO Ml 108 U-DEC-77 20:08 PAGE 2-4 



229 

230 0OO22A 

231 000230 
232 

233 

§i 

236 

237 000232 

238 0002A6 

239 000250 
2A0 00025A 
2A1 000262 
2A2 000266 
2A3 000272 
2AA 00027A 
2A5 OC ^02 
2A6 000306 
2A7 000312 
2A8 00031 A 



012700 
000536 



0103A6 
01650A 
116A6A 
016A03 
032723 
001003 
016365 

012665 
012603 
000167 



OOOOOOC 



AOS: MOV #IS.SUC»377.R0 .-SET SUCCESSFUL COMPLETION STATUS 
50S: BR 110$ 



•*-$CTlNT-TA11 TAPE CASSETTE CONTROLLER INTERRUPTS 



OOOOOOG 

OOOOOOG OOOOOOG 
OOOOOOG 
000200 

177776 OOOOOOG 



OOOOOOG 
OOOOOOG 



60S: 



INTSE$ CT,PR6.T$$A11 

MOV R3.-(SP) 

MOV U.SCB(R5),RA 

MOVB S.ITM(RA),S.CTM(RA) 

MOV S,CSR(RA}.R3 

BIT #200.(R3)« 

BNE 60S 

MOV -2(R3).U.CW3(R5) 

CALL aU.CW2(R5) 

MOV (SP)+,U.CW2(R5) 

MOV (SP)*.R3 

JMP SINTXT 



GENERATE INTERRUPT SAVE CODE 

SAVE R3 

GET ADDRESS OF SCB 

;;;RESET CURfiEfJT DEVICE TIMEOUT COUNT 
GET ADDRESS OF CSR 
TRANSFER REQUEST? 
IF NE YES 

;SAVE CURRENT STATUS 
CALL INTERRUPT ROUTINE 
SAVE INTERRUPT RETURN ADDRESS 
RESTORE R3 
EXIT FROM INTERRUPT 



252 
253 
25A 000320 

255 000322 

256 000326 

257 000330 

258 000332 

259 00033A 

260 000336 

261 0003A0 

262 0003A2 

263 0003AA 
26A 000350 

265 00035A 

266 000356 

267 000362 

268 000366 

269 000370 

270 00037A 

271 000376 
272 



275 
276 

277 OOOAOO 

278 000A02 

279 000A06 

280 0OOA10 

281 0OOA12 

282 0OOA16 

283 0OOA20 



SPACING FUNCTION (FILE AND BLOCK) 



28A 
285 



100A06 
005365 
003A03 
0052A3 

000771 
0050A3 
005726 
012603 

016501 
1000A5 
1A2701 
122701 
003AA5 
0A2701 
001713 
000AA1 



100A26 
005365 
002A16 
0115A6 



000767 



OOOOOOG 



SPCBK: 



70S: 



OOOOOOG 

177761 
000012 

120777 



BMI 

DEC 

BLE 

INC 

CALL 

BR 

CLR 

TST 

MOV 

CALL 

MOV 

BPL 

BICB 

CMPB 

BLE 

BIC 

BEQ 

BR 



70S 

U.CNT(R5) 

70S 

-(R3) 

a(SP)^ 

SPCBK 

-(R3) 

(SP)* 

(SP)*,R3 

SFORK 

U.CU3(R5).R1 

90S 

**C<7*2>,R1 

#5«2.R1 

100S 

#1 20777. R1 

AOS 

100S 



READ LOGICAL FUNCTION 



OOOOOOG 



RDBLK: 



BMI 

DEC 

BLT 

MOV 

CALL 

CALL 

BR 



UREOF 

U.CNT(R5) 

SOS 

(R3),-(SP) 

SPT8YT 

a(SP)t 

RDBLK 



:IF MI ERROR 

:DECREMENT SPACING COUNT 

:IF LE DONE 

: INITIATE NEXT OPERATION 

:SET INTERRUPT RETURN ADDRESS 

:G0 AGAIN 

: CLEAR INTERRUPT ENABLE 

; REMOVE RETURN FROM STACK 

* RESTORE R3 

•CREATE A SYSTEM PROCESS 
GET FINAL STATUS 
IF PL SUCCESS 

CLEAR ALL BOT FUNCTION CODE 
FORWARD OR REVERSE FUNCTION? 
IF LE FORWARD 

CLEAR ^RROR, BOT, UNIT. AND FUNCTION 
IF EO NO ERRORS 
ANALYZE ERROR 



:IF MI ERROR 

.-DECREMENT BVTE COUNT 

;IF LT NO MORE TO READ 

;READ BYTE FROM DATA REGISTER 

;PUT BYTE IN USER BUFFER 

;SET INTERRUPT RETURN ADDRESS 

;G0 AGAIN 



•••* I 15 **** 



nr. 



^Aatlk^k ft*« 4 AM 



4 i ^fkip#>_w ^A. Aft a Are ^_C 



CTDRV MACRO MIIOS U-OEC-77 20:08 PAGE 2-5 



WRITE LOGICAL FUNCTION 



289 000A22 

290 00042A 

291 000430 

292 000432 

293 000436 

294 000440 

295 000442 

296 000444 

297 000450 

298 000454 



100415 
005365 
002405 

112613 

000767 
005265 
052743 



OOOOOOG 



OOOOOOG 
000020 



URBLK: BMI 
DEC 
BLT 
CALL 
M0V8 
CALL 
BR 
INC 
BIS 
CALL 



SOS: 



yREOF 

U.CNT(R5) 

SOS 

S6TBYT 

(SP)t.{R3) 

i(SP)^ 

yRBLK 

U.CNT(R5) 

#20. -(R3) 

a(SP)« 



IF MI ERROR 

DECREMENT BYTE COUNT 

IF LT NO MORE TO WRITE 

GET BYTE FROM USER BUFFER 

WRITE BYTE INTO DATA REGISTER 

SET INTERRUPT RETURN ADDRESS 

GO AGAIN 

ADJUST BYTE COIWT 

INITIATE LAST EYTE SEQUENCE 

SET INTERRUPT FETURN ADDRESS 



304 000456 


005043 




305 000460 


005726 




306 000462 


012603 




307 000464 






308 000470 


012700 


OOOOOOC 


309 000474 


016501 


OOOOOOG 


310 000500 


100012 




311 000502 


000301 




312 000504 


012702 


000002' 


313 000510 


005000 




314 000512 


152200 




315 000514 


132201 




316 000516 


001774 




317 







328 000520 
329 



335 

336 000522 

337 000526 

338 000532 

339 000536 



000402 



M 



016401 
016101 
166501 



: REWIND AND WRITE END OF 


FILE FUNCTIONS 




WREOF: 


CLR 


-(R3) 




;; CLEAR INTERRUPT ENABLE 






T5T 


(SP) + 




:: REMOVE RETURN 'ROM STACK 






MOV 


(SP)*,R3 




•;;RESTORE R3 






CALL 


SFORK 




;; CREATE A SYS' EM PROCESS 




90S: 


MOV 


#IS.SUCM77,R0 


ASSUME SUCCESSFUL COMPLETION STATUS 






MOV 


U.CW3(RS) 


.R1 


•GET FINAL STATUS 






BPL 


110S 




•IF PL SUCCESS 




100S: 


SWAB 


R1 




SWAP ERROR BITS TO LOW BYTE 






MOV 


*ERRTB.R2 




•GET ADDRESS OF ERROR CONTROL TABLE 




105S: 


CLR 
BISB 


RO 
(R2)^,R0 




•PICKUP NEXT ERROR STATUS CODE 






BITB 


{R2)*.R1 




lERROR BIT SET? 






BEQ 


105S 




;IF EQ NO 


• PB019 

• Pfl019 




.IF DF 


ESSDVC 






• PB019 

• PB019 




BITB 


#26. R1 




•WRITE LOCK. TIMING OR OFF-LINE? 


• PB019 




BEQ 


110S 




•IF EQ NO 


PB019 




CALL 


SDVERR 




;LOG DEVICE ERROR 


PB019 
PB019 




.ENDC 








P6019 
P6019 
PB019 




BR 


110S 




[FINISH I/O 


PB019 



DEVICE TIMEOUT RESULTS IN THE CURRENT OPERATION BEING TERMINATED. TIMEOUTS ARE 
USUALLY CAUSED BY POWCRFAILURE BUT ALSO MAY BE THE RESULT OF A HARD- 
WARE FAILURE. 



OOOOOOG 

000030 

OOOOOOG 



CTOUT: CALL 
110S: MOV 
MOV 
SUB 



SDTOER 

S.PKT(R4),R1 

I.PRMt4(Rl),Rl 

U.CNT(R5).R1 



;;LOG DEVICE TIMEOUT 
RETRIEVE ADDRESS OF I/O PACKET 
GET ORIGINAL COUNT VALUE 
SUBTRACT COUNT REMAINING 



; PB019 



.IF DF ESSDVC 



«*•• J 13 **** 



rm 



&•« • f\m 



CTORV MACRO Ml 108 U-DEC-77 20:08 PAGE 2-6 



348 

3A9 0005A2 

350 0005A6 000167 177320 

351 

llf 000001 



HOV #A01 .R2 
.ENDC 



CALL SIODON 
JHP CTINI 
.DSABL LSB 



; SET CURRENT t FINAL RETRY COUNT TO 1 



.■FINISH I/O OPERATION 
:G0 AGAIN 



.END 



rnzT 



•••• K 13 •••* 



CTORV 


HACRO mi08 U-OEC-77 20:08 PAGE 2-7 






SYMBOL 


TABLE 












A. AST 


000006 


FE.NLG= 


100000 




I.LGTHr 


000044 


A.BYT 


OOOOOA 


FE.PKT= 


000100 




I.LNK 


000000 


A.CBL 


000002 


FE.PLA= 


000020 




I.LN2 


000006 


A.OO^R 


177776 


H$SRTZ= 


000074 




I.PRI 


000002 


A.KSR5 


17777A 


IE.DA0= 


••*••* 


GX 


I.PRH 


000024 


A.NPR 


000010 


IE.DNR= 




GX 


I.TCB 


000004 


A.PRn 


000012 


IE.E0F= 


****** 


GX 


I.UCB 


000010 


CNTBL 


OOOOOOR 


IE.EOT= 


****** 


GX 


KtSCNTs 


177546 


CTCAN 


000222R 


IE.IFC= 


****** 


GX 


KSSCSRs 


177546 


CTINI 


000072R 


IE.VER= 




GX 


KSSIEN: 


000115 


CTOUT 


0OO522R 


lE.WLM 


****** 


GX 


KSSLDC= 


000001 


CTPUF 


000222R 


IO.EOF= 


****** 


GX 


K$$TPS= 


000074 


CtSORE= 


OOOAOO 


IO.RLB= 




GX 


LGFCN 


00001 6R 


ERRTB 


000002R 


IO.RyD= 


****** 


GX 


MPAR = 


172100 


FE.CAL= 


000040 


I0.SP6= 


****** 


GX 


MPCSR = 


177746 


FE.CEX= 


020000 


IO.SPF= 


****** 


GX 


N$SCRB= 


000124 


FE.ORV= 


000010 


IO.WLB= 




GX 


PIRQ = 


U7772 


FE.EXP= 


000200 


IS.SUC= 


****** 


GX 


PRO = 


000000 


FE.EXT= 


000001 


LAST 


000022 




PR1 = 


000040 


FE.EXV= 


000004 


I.ATTL= 


000044 




PR4 = 


000200 


FE.LSI= 


000400 


I.EFN 


000003 




PR5 r 


000240 


FE.MUP= 


000002 


I.FCN 


000012 




PR6 = 


000300 


FE.MXT= 


040000 


I.IOSB 


000014 








. ABS. 


177776 
000552 


000 
001 










ERRORS 


DETECTED: 














PR7 

PS 

RDBLK 

RSSFII 

RSSJPO: 

RSSJPV 

RSSJSV 

RSSKIV 

RtSPII 

RSSX11 

RSSIIN 

RStllS 

SPCBK 

SWR 

SStECC 

SSSVSZ 

S.CSR 

S.CTH 

S.ITM 

S.PKT 

TPS 

T$$A11 



000340 

177776 

000400R 

000001 

000000 

000001 

000001 

000001 

000001 

000001 

000000 

000000 

000320R 

177570 

000000 

001000 

r ****** 



r ****** 
= ****** 

= 177564 
= 000001 



GX 
GX 
GX 
GX 



VIRTUAL MEMORY USED: 2379 WORDS ( 10 PAGES) 
DYNAMIC MEMORY: 15744 WORDS ( 60 PAGES) 
ELAPSED TIME: 00:00:18 

C41.20]CTORV.SYO:C41.30]CTDRV/-SP=C1.nEXEMC/ML.C41.10]RSXMC.C11.10]CTDRV 
T s 



T$fC11= 

TS$J16= 

TS$KMG= 

TSSMIU 

U.8UF = 

U.CNT = 

U.CW2 

U.CW3 

U.SCB 

V$»CTR= 

WRBLK 

WREOF 

SCTINT 

$CTTBL 

SDTOER: 

SFORK = 

$GT8YT= 

»GTPKT= 

$INTSV= 

$INTXT= 

SIODON= 

$PTBYT= 



000001 
000001 
000000 
000001 

****** 



= ****** 



GX 
GX 
GX 
GX 
****** GX 

000400 
000422R 
0004 56R 
000232RG 
000062RG 
****** GX 
****** GX 
****** GX 
****** 
*•*•*• 
****** 
****** 



GX 
GX 
GX 
GX 



****** GX 



•••* L 13 *•*• 




***• H ^3 •**« 







.TITLE OBORV 
.IDFNT /05/ 



COPYRIGHT (C) 197«, 1978 

DIGITAL EQUIPMENT CORPORATION. MAYNARO. MASS. 

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED 
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE. 

VERSION OS 

D. N. CUTLER 2-JUL-7« 

PREVIOUSLY MODIFIED BY: 

P. J. BEZEREDI 
D. N. CUTLER 
C. A. D'ELIA 

MODIFIED BY: 

P. J. BEZEREDI 30-NOV-76 

P8009 — CORRECT OUT OF RANGE BRANCHES WHEN A 
MULT I -CONTROLLER DRIVER IS GENERATED. 

P. J. BEZEREDI 07-FEB-77 

PB013 — ADDITION OF EXPANDED WRITE CHECK CAPABILITY. 

BEZEREDI U-FEB-77 



P. J 



PBOU — LOAD SECOND STATUS WORD WITH BYTES ACTUALLY 
TRANSFERED BEFORE CALLING SIODON. 



P. J. BEZEREDI 16-FEB-77 

PB015 — APPLY ECC CORRECTION AND OFFSET RECOVERY FOR 
READ FUNCTIONS ONLY. 

P. J. BEZEREDI 2P-FEB-77 

PB016 — LOAD PROPER ADDRESS EXTENSION REGISTER FOR 
MIXED MASSBUS CONFIGURATIONS. 

P. J. BEZEREDI 16-MAY-77 

PB030 " POWERFAIL RECOVERY SUPPORT. 

P. J. BEZEREDI 07-SEP-77 

PB037 -- USE R1 FOR I/O PACKET ADDRESS IN FUNCTION 
INITIATION SECTION. 



RH11-RP04/05/06 DISK PACK DRIVER 



••** N ^3 «*** 



I'BDRV MACRO Ml 108 1A-0tC-77 20:08 



58 
59 
60 
61 

62 000000 

63 000000 
64 

65 
66 
67 
68 
69 
70 
71 
72 
73 
7A 
75 
76 

yi 

78 
79 
80 
81 
82 
83 



PAGE 2-1 

; MACRO LIBRARY CALLS 



8; 

S3 

86 

87 

88 

89 

90 

91 

92 

93 

9A 

95 

96 

97 

98 

99 

100 

101 

102 

103 

10A 

1C5 



000000 

040000 
020000 



000002 
000004 
000006 

000010 

100000 
040000 
020000 
010000 
004000 
002000 
001000 
000400 

000012 

040000 
010000 
004000 
000200 
000100 



000014 

100000 
040000 
020000 
010000 
004000 
002000 
001000 
000400 
")200 
)100 

000020 



.MCALL 
HWDDFS 
PKTOFS 



HWDDFS. PKTDFS 



: DEFINE HARDWARE REGISTERS 
;DEFINE I/O PACKET OFFSETS 



EQUATED SYMBOLS 

DEVICE REGISTER AND STATUS BIT DEFINITIONS 



RPCS1=0 

TRE -40000 
MCPE=20000 



RPWC=2 
RPeA=4 
RPDA=6 

RPCS2«10 

DLT=100000 

WCE-40000 

UPE-20000 

NED= 10000 

NEM<»4000 

PGEs2000 

MXF»1000 

MDPEs400 

RPDS«;2 

ERR>400C0 
MOL- 10000 
WRL>c4CC0 
DRY=20C( 
VV=100 



RPER1«14 

DCK> 100000 

UNS*40QQ0 

OPI«20000 

DTE'10000 

WLE«4000 

IAE<2000 

AOE-1000 

HCRC>400 

HCE«20Q 

ECH«100 

WCFs40 

FER»20 



.•CONTROL STATUS REGISTER 1 

: TRANSFER ERROR 

:NASSBUS CONTROL PARITY ERROR 



WORD COUNT REGISTER 
BUFFER ADDRESS REGr^TER 
DESIRED TRACK/SECTk. REGISTER 

CONTROL STATUS REGISTER 2 

DATA LATE ERROR 
WRITE CHECK ERROR 
UNIBUS PARITY ERROR 
NONEXISTENT DISK ERROR 
NONEXISTENT MEMORY ERROR 
PROGRAMMING ERROR 
MISSED TRANSFER ERROR 
MASSBUS DATA PARITY ERROR 

DRIVE STATUS REGISTER 

ERROR SUMMARY BIT 
MEDIUM ONLINE 
WRITE LOCKED DRIVE 
DRIVE READY 
VOLUME VALID 



: ERROR SUMMARY REGISTER 

.-DATA CHECK ERROR 
.-DRIVE UNSAFE 
.OPERATION INCOMPLETE 
.•DRIVE TIMING ERROR 
.•WRITE LOCK ERROR 
.•INVALID DISK ADDRESS 
.•ADDRESS OVERFLOW 
.•HEADER CRC ERROR 
.•HEADER COMPARE ERROR 
;ECC HARD ERROR 
.•WRITE CLOCK FAILURE 
;FORMT ERROR 



•••• B 14 **** 



DBDRV MACRO Ml 108 U-OEC-77 20:08 PAGE 2-2 



CPE=10 
RMR=A 
ILR=2 
ILF=1 



115 


000010 


116 


OOOOOA 


117 


00CO02 


118 


000001 


119 




120 




121 


OfK)016 


122 


000020 


123 


000022 


12A 


00002A 


125 


fJ00026 


126 


000030 


127 




128 


000032 


129 




130 


010000 


131 


OOAOOO 


132 


002000 


133 




13A 




135 


00003A 


136 


OOOOAA 


137 


0000A6 


138 


000050 


130 




UO 




U1 




1A2 




U3 




1A4 




1A5 




U6 




1A7 




U8 




U9 




150 




151 


000010 


152 




153 




15A 




155 




156 




157 




158 




159 OCOOOO 




160 000002 




161 




162 




163 




16A 




165 




16^ 




16/' 




168 




169 




170 




171 





RPAS=16 

RPLA=20 

RPDBR=22 

RPMR=2A 

RPDT=26 

RPSN=30 

RPOF=32 

FMT22=10000 
ECI=A000 
HC 1=2000 



RP0C=3A 
RPEC1=AA 
RPEC2=46 
RPBAE-50 



.IF DF nSSIXD 



RPBAE=7A 

.ENDC 

; ERROR RETRY COUNT 
RETRY=8. 



CONTROL BUS PARITY ERROR 
REGISTER MODIFY REFUSED 
ILLEGAL REGISTER 
ILLEGAL FUNCTION 



ATTENTION SUMMARY REGISTER 
LOOKAHEAD REGISTER 
DATA BUFFER REGISTER 
MAINTENENCE REGISTER 
DRIVE TYPE REGISTER 
DRIVE SERIAL NUMBER 

DRIVE OFFSET REGISTER 

FORMAT (1=16 BIT) 

ECC INHIBIT 

HEADER COMPARE INHIBIT 



DESIREDED CYLINDER NUMBER 

ECC POSITION REGISTER 

ECC PATTERN REGISTER 

BUS ADDRESS EXTENSION REGISTER 



.•MIXED MASSBUS ADDRESS EXT. REGISTER 



PB016 
PB016 
PB016 
PB016 
PB016 
PB016 
PB016 
PB016 
P6016 



.•CONTROLLER ERROR RETRY COUNT 



LOCAL DATA 

CONTROLLER IMPURE DATA TABLES (INDEXED BY CONTROLER NUMBER) 



CNTBL: .BLKW RS$JP1 
RTTBL: .BLKW RSSJPI 



.IF Gl RWJP1-1 

TEMP: .BLKW 1 
.ENDC 

.IF DF R$$JPO 



; ADDRESS OF CURRENT UNIT CONTROL BLOCK 
.•RETRY COUNT FOR CURRENT OPERATION 



.•TEMPORARY STORAGE FOR CONTROLLER NUMBER 



t«** c 1A **** 



DBDRV MACRO Ml 108 U-DEC-77 20:08 



OFFTB: 



172 OOOOOA 

173 

17A 

175 

176 

177 

178 000006 000000 

179 000010 010020 

180 000012 010220 

181 OOOOH 0100A0 

182 000016 0102A0 

183 000020 010060 
18A 000022 010260 
185 00002A 000000 
186 
187 
188 
189 
190 
191 
192 
193 
19A 
195 
196 
197 

198 FUNTBL: 

199 

200 

201 

202 

203 

20ti FUNTBE : 

205 

206 

207 

208 

209 

210 

211 

212 

213 000026 000040* 

Zyt* 000030 000362' 

215 000032 00056A' 

216 000034 00036A' 
217 
218 
219 
220 
221 
222 
221 
22^ 
225 
226 
227 
228 



PAGE 2-3 

OF FAD: .8LKW RSSJPI 

OFFSET POSITIONING VALUE TABLE 



.WORD 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 
.WORD 

.ENDC 



FMT22:20 

FMT221220 

FMT22I40 

FMT22!240 

FMT22!60 

FMT22!260 





.-ADDRESS OF CURRENT OFFSET VALUE 



RETURN TO CENTERLINE 

♦AOO 

-AOO 

♦800 

-800 

♦1200 

-1200 

RETURN TO CENTERLINE 



.IF DF DSSIAG 

.nCALL UMDIOS 
UMDIOS 



DIAGNOSTIC FUNCTION TABLE 



.BYTE 
.BYTE 
.BYTE 
.BYTE 
.BYTE 
.BYTE 



.ENDC 



107. 
105. 
115, 
173. 
163. 
151. 



lO.HMS 
lO.BLS 
10. OFF 
lO.RDH 
lO.WDH 
lO.WCK 



.•DEFINE USER-MODE DIAGNOSTIC DEFINITIONS 



IQ.UMDK377 
IQ.UnD8377 
IQ.UnDft377 
IQ.UM0ft377 
IQ.UMD8377 
IQ.UMDR377 



DRIVER DISPATCH TABLE 



SDBTBL::.WORD DBINI 

.WORD DBCAN 

.WORD DBOUT 

.WORD DBPWF 



.•DEVICE INITIATOR ENTRY POINT 
; CANCEL I/O OPERATION ENTRY POINT 
.DEVICE TIMEOUT ENTRY POINT 
.•POWERFAIL ENTRY POINT 



•♦-DBINI-RH11-RP0A/05/06 DISK PACK CONTROLLER INITI/'^'OR 

THIS ROUTINE IS ENTERED FROM THE QUEUE I/O DIRECTIVE WHEN AN I/O REQUEST 
IS QUEUED AND AT THE END OF A PREVIOUS 1/0 OPERATION TO PROPAGATE THE EXECU- 
TION OF THE DRIVER. IF THE SPECIFIED CONTROLLER IS NOT BUSY. THEN AN ATTEMPT 
IS MADE TO DEQUEUE THE NEXT I/O REQUEST. ELSE A RETURN TO THE CALLER IS 
EXECUTED. IF THE DEQUEUE ATTEMPT IS SUCCESSFUL. THEN THE NEXT I/O OPER- 
ATION IS INITIATED. A RETURN TO THE CALLER IS THEN EXECUTED. 

INPUTS: 



*••• D 1A **•• 



OBORV MACRO M1108 U-DEC-77 20:08 PAGE 2-A 



229 

230 

231 

232 

233 

23A 

235 

236 

237 

238 

239 

2A0 000036 

2A1 OOOOAO 

2A2 OOOOAA 10377A 

2A3 

2AA 

2A5 

2A6 

2A7 

2A8 

2A9 

250 

251 

252 

253 

25A 

255 

256 

257 

258 

259 

260 

261 

262 

263 

26A 

265 

266 

267 

268 

269 

270 

271 

272 

273 

27A 

275 0000A6 010563 

276 

217 

278 

279 

280 000052 006365 

281 000056 006365 

282 000062 006365 

283 000066 006365 
28A 

285 



R5=ADDRESS OF THE UCB OF THE CONTROLLER TO BE INITIATED. 

OUTPUTS: 

IF THE SPECIFIED CONTROLLER IS NOT BUSY AND AN I/O REQUEST IS WAIT- 
ING TO BE PROCESSED. THEN THE REQUEST IS DEQUEUED AND THE I/O OPER- 
ATION IS INITIATED. 



.ENABL LSB 
1$: RETURN 

DBINI : CALL SGTPKT 

BCS 1$ 



.•RETURN TO CALLER 

;GET AN I/O PACKET TO PROCESS 

:IF CS CONTROLLER BUSY OR NO REQUEST 



000000' 



OOOOOOG 
OOOOOOG 
OOOOOOG 
OOOOOOG 



THE FOLLOWING ARGUMENTS ARE RETURNED BY SGTPKT: 

R1=ADDRESS OF THE I/O REQUEST PACKET. 

R2=PHYSICAL UNIT NUMBER OF THE REQUEST UCB. 

R3=C0NTR0LLER INDEX. 

RA=AODRESS OF THE STATUS CONTROL BLOCK. 

R5=ADDRESS OF THE UCB OF THl CONTROLLER TO BE INITIATED. 

RH11-RP0A/05/06 DISK PACK I/O REQUEST PACKET FORMAT 

WD. 00 — I/O QUEUE THREAD WORD. 

WD. 01 — REQUEST PRIORITY. EVENT FLAG NUMBER. 

WO. 02 — ADDRESS OF THE TCB OF THE REQUESTOR TASK. 

WO. 03 — POINTER TO SECOND LUN WORD IN REQUESTOR TASK HEADER. 

WO. OA — CONTENTS OF THE FIRST LUN WORD IN REQUESTOR TASK HEADER 

WD. 05 — I/O FUNCTION CODE (lO.RLB OR lO.WLB). 

WD. 06 — VIRTUAL ADDRESS OF I/O STATUS BLOCK. 

WD. 07 — RELOCATION BIAS OF I/O STATUS BLOCK. 

WD. 10 — I/O STATUS BLOCK ADDRESS (REAL OR DISPLACEMENT ♦ 1A0000) 

WO. 11 — VIRTUAL ADDRESS OF AST SERVICE ROUTINE. 

WO. 12 — MEMORY EXTENSION BITS (BITS A AND 5) OF I/O TRANSFER. 

WD. 13 — BUFFER ADDRESS OF I/O TRANSFER. 

WO. U — NUMBER OF BYTES TO BE TRANSFERED. 

WO. 15 — DIAGNOSTIC SUPPLIHENTAL PARAMETER ELSE NOT USED. 

WO. 16 — HIGH PART OF LOGICAL BLOCK NUMBER AND HIGH BYTE NOT US 

WO. 17 — LOW PART OF LOGICAL BLOCK NUMBER OF I/O REQUEST. 

WO. 20 -- RELOCATION BIAS OF DIAGNOSTIC REG. BLK ADRS. 

WD. 21 — DIAGNOSTIC REG. BLK ADRS (REAL OR DISPL.^IAOOOO). 



(UCB), 



NOV 



R5,CNTBL(R3) ;SAVE ADDRESS OF REQUEST UCB 



.IF NDF MSSEXT 



U.BUF(R5) 
U.BUF(R5) 
U.aUF(R5) 
U.BUF(R5) 



ASL 
.ENDC 



SHIFT ADDRESS EXTENSION BITS INTO PLACE 



*•*• E lA **** 






DBDRV MACRO N1108 U 


-DEC-77 20:08 PAGE 2-5 








286 
287 
288 
289 










• IF DF 


DSSIAG 












CHPB 


#I0.HMS/»D<256>. 


[.FCNtKRD .-DIAGNOSTIC FUNCTION? 


290 










BNE 


5S 


IF NE NO 


291 










nov 


#FUNTBL.RO 


GET ADDRESS OF FUNCTION TABLE 


292 








4$: 


NOVB 


(R0)+,U.BUF(R5) 


LOAD CONTROLLER FUNCTION CODE 


293 










CMPB 


(R0)*.I.FCN(R1) 


IS IT THE CORRECT CODE? 


294 










BEQ 


10S 


IF EQ YES 


295 










CMP 


#FUNTBE.RO 


END OF FUNCTION TABLE? 


296 










BNE 


4S 


IF NE NO 


297 
















298 










.ENDC 






299 
300 
301 000072 
















012700 


OOOOOOC 




5$: 


MOV 


#IE.IFC8377,R0 


-ASSUME ILLEGAL FUNCTION 


302 000076 


112765 


000171 


OOOOOOG 




MOVB 


/ri71.U.BUF(R5) 


-ASSISE READ LOGICAL FUNCTION 


303 0001 OA 


122761 


OOOOOOC 


000013 




CMPB 


#I0.RLB/256.,I.FCN*1(R1) .-READ LOGICAL FUNCTION? | 


30A 000112 


103002 








BHIS 


6S 


-IF HIS FUNCTION IS LEGAL 


305 0001 U 


000167 


000514 






JMP 


80$ 


-FUNCTION IS ILLEGAL : P6014 


306 000120 


001403 






6$: 


BEQ 


10$ 


-IF EQ FUNCTION IS READ ;♦*-! 


307 000122 


162765 


000010 


OOOOOOG 




SUB 


#10.U.BUF(R5) 


-CONVERT TO WRITE LOGICAL FUNCTION 


308 000130 


012763 


000010 


000002' 


10$: 


MOV 


#RETRV.RTTBL(R3) 


.-SET RETRY COUNT 


309 
















310 
















311 










.IF OF 


R$$JP0 




312 
















313 000136 


105065 


000001 G 






CLRB 


U.CW2*1(R5) 


-CLEAR HEADER COMPARE INHIBIT 


3U 000U2 

315 

316 










CALI 


210$ 


•SET INITIAL OFFSET RECOVERY VALUES 










.ENDC 






317 
















318 
















319 00OU6 










CALL 


$6LKCK 


•CHECK LOGICAL BLOCK NUMBER 


320 000152 


012701 


000020 






MOV 


#16.,R1 


-SET DIVIDE LOOP COUNT 


321 000156 


006300 






20$: 


ASL 


RO 


DOUBLE LEFT SHIFT 


322 000160 


006102 








ROL 


R2 




323 000162 


020227 


000642 






CMP 


R2,*19.«22. 


-PARTIAL REMAINDER LARGER THAN DIVISOR? 


32A 000166 


103403 








BLO 


30$ 


;IF LO NO 


325 000170 


162702 


000642 






SUB 


#19.*22..R2 


•SUBTRACT OUT DIVISOR 


326 0001 7A 


005200 








INC 


RO 


•ACCUMULATE QUOTIENT 


327 000176 


005301 






30S: 


DEC 


R1 


;ANY MORE PARTIAL DIVIDES? 


328 000200 


003366 








Bsr 


20$ 


•IF GT YES 


329 000202 


010063 


000034 






rnv 


R0.I.PRM*10(R3) 


;SAVE DESIRED CYLINDER ADDRESS 


330 000206 


010200 








mi 


R2.rt0 
#22. ,R1 


;SET DIVIDEND TO TRACK/SECTOR REMAINDER 


331 000210 


0U701 


000026 






MOV 


•SET DIVISOR TO NUMBER OF SECTORS/TRACK 


332 0002U 










CALL 


$DIV 


•CALCULATE TRACK AND SECTOR 


333 000220 


OOOiDO 








SWAB 


RO 


•SWAP TRACK TO HIGH BYTE 


33A 000222 


050100 








»$ 


RI.RO 


•MERGE TRACK 


335 00022A 

336 

337 


010063 


000036 






R0.I.PRM*12(R3) 


•SAVE DESIRED TRACK AND SECTOR ADDRESS 
















338 
339 

340 
341 
342 










.IF DF 


M$$IXD 












CALL 


$RQCH 


•REQUEST CHANNEL 










.ENDC 






* ' •*•* f H •*•* 



«AA«>tk/% m4 4 na 



<y_rver_T7 1A.AO bArc 0_iL 



DBDRV MACRO MHOS U-OEC-77 20:08 PAGE 2-6 



3A3 
3AA 
5A5 
3A6 
3A7 
3A8 
3A9 0002% 

350 00023A 

351 0002A0 

352 0002A6 

353 000252 
35A 000256 

355 000262 

356 000266 

357 000272 

358 000276 

359 000300 

360 000302 
361 

362 

363 

36A 

365 000306 

366 

367 

368 

369 

370 

371 

372 

373 

37A 

375 

376 

377 

378 

379 

380 

381 

382 

383 

38A 

385 

386 

387 

388 

389 

390 

391 

392 

393 

39A 

395 

396 0003U 

397 000320 

398 000326 

399 000332 



INITIATE I/O OPERATION 



016A02 
016A01 
116A6A 
062702 
012712 
116512 
016U2 
0165A2 
0165A2 
006012 
005A12 
0127A2 



OOOOOOG 

OOOOOOG 

OOOOOOG OOOOOOG 

000010 

OOOOAO 

OOOOOOG 

000036 

000002G 

OOOOOOG 



000023 



AOS: 



012762 010000 000032 



AAS: 



ASS: 



012700 OOOOOOC 

016162 0OC03A 00003A 

016203 000012 
005103 



MOV S.CSR(RA).R2 :6ET ADDRESS OF CSR 

MOV S.PKT(RA),R1 ;GET I/O PACKET ADDRESS 

MOVB S.ITM(RA),S.CTM(RA) ;SET CURRENT DEVICE TIMEOUT COUNT 

ADD #10. R2 : POINT TO SECOND CSR 

MOV #A0.(R2) : CLEAR RH11 CONTROLLER AND ALL DRIVES 

MOVB U.UNIT(R5).(R2) .-SELECT PROPER DRIVE 

MOV I.PRM+12(R1).-{R2) ; INSERT TRACK/SECTOR ADDRESS 

MOV U.BUF*2{R5).-(R2) ; INSERT BUFFER ADDRESS 

MOV U.CNT(R5).-(R2) .-INSERT NUMBER OF BYTES TO TRANSFER 

ROR (R2) .-CONVERT TO WORD COUNT 

NEG (R2) .-MAKE NEGATIVE WORD COUNT 

MOV #23. -(R2) ;tXECUTE PACK ACK FUNCTION TO SET VV 

.IF NDF R$SJPO!D$SIAG 

MOV *FMT22.RPOF(R2) ;SET 16 BIT FORMAT 

.IFF 

MOV #FMT22,-(SP) .-GET FORMAT BIT 

.IF DF DSSIAG 

CMP #I0.0FF!IQ.>MD.I.FCN(R1) ;DIA6N0STIC OFFSET FUNCTION? 

BNE AA$ :IF NE NO 

BIS I.PRM*6{R1).(SP) .-YES. SET OFFSET VALUE 

;REF LABEL 

.ENDC 



; PB037 



; PB037 



; P8037 

; PB037 

;**-1 



.IF DF RSSJPO 

TSTB U.CW2*1(R5) 

BEQ ASS 

BIS «HCI.(SP) 

.ENDC 



INHIBIT HEADER COMPARE? 

IF EQ NO 

SET HEADER COMPARE INHIBIT 



MOV 
.ENDC 



MOV 
MOV 
MOV 

con 



(SP)*.RP0F(R2) .-SET OFFSET REGISTER 



*IE. DNRR377.ro .'ASSUME DRIVE NOT READY 
I.PRM*10(R1),RPDC(R2) ;SET DESIRED CYLINDER ADDRESS 
RPDS(R2),R3 .-GET CURRENT DRIVE STATUS 
R3 .-COMPLEMENT STATUS 



PB037 
PB057 
PB037 



*••* 6 1A **** 



nTT— T 



DBORV MACRO Ml 108 U-DEC-77 20:08 


PAGE 2-7 










400 00033A 


032703 


010300 




BIT 


#M0L!0RY!VV.R3 ;DR1VE READY AND ON-LINE? 


PB037 




401 0003A0 


001004 






BNE 


46$ :IF NE NO 


PB030 




402 0003A2 


032762 


040000 000014 




BIT 


*UNS,RPER1(R2) ;DRIVE UNSAFE? 


♦*-5 




A03 000350 


001402 






BEQ 


48$ ;IF EQ NO 


P8030 




A04 000352 






46$: 




;REF LABEL 


PB030 




A05 












PB030 




406 












PB030 




407 








.IF OF 


P$$KFL 


PB030 




408 












PB030 




409 








BITB 


#US.SPU,U.STS(R5) ;IS DRIVE SPINNING UP? '. 


PB030 




410 








BNE 


50$ ;IF NE YES 


PB030 




411 












PB030 




412 








.IFTF 




PB030 




413 












P6030 




414 












PB030 




415 








.IF OF 


D$$IAG 


■ P8030 




416 












PB030 




417 








BITB 


#IQ.UMD.I.FCN(R1) .-DIAGNOSTIC OPERATION? 


PB030 




418 








BEQ 


47$ :IF EQ NO 


PB030 




419 








JMP 


58$ .-PROCESS DIAGNOSTIC NOT READY 


PB030 




420 






47$: 




;REF LABEL 


• PB030 




421 












PB030 




422 








.ENDC 




• PB030 




423 












- PB030 




424 












• PB030 




425 








.IF OF 


E$$DVC 


• PB030 




426 












- PB030 




427 








CALL 


$OVERR ;L0G OR WE NOT READY ERROR 


- PB030 




428 












• PB030 




429 








.ENDC 




• PB030 




430 












• PB030 




431 












■ PB030 




432 000352 


000167 


000?56 




JMP 


80$ .-FINISH UP 


• PB030 




433 000356 






48$: 




;REF LABEL 


• PB030 




434 




^ 








• PB030 




435 








• IFT 




PB030 




436 












• PB030 




437 








BICB 


#US.SPU.U.STS(R5) .-RESET DRIVE SPINNING UP 


• PB030 




438 












• PB030 




439 








.ENDC 




• PB030 




440 












• **-1 




441 
















442 
443 
444 








• IF OF 


M$$EXTeM$$MGE 












MOVB 


U.BUF+1(R5).RPBAE(R2) .-SET MEMORY EXTENSION BITS 


• PB016 




445 












;**-1 




446 








.IFTF 








447 
















448 
















449 
450 
451 
452 
453 








.IF OF 


E$$DVC 












CALL 


$8MSET .-SET I/O ACTIVE BIT IN MAP 












.ENDC 








454 
















455 
















456 








.IFT 


















•••• H U •♦•• 




1 



MArnn itiino 



iA.r\cr.77 on.Afi DAnc 3.a 



016512 OOOOOOG 



DBORV MACRO Ml 108 U-DEC-77 20:08 PAGE 2-8 



457 

A58 

A59 

A60 

A61 

<i62 000356 

A63 

A6A 

A65 

A66 

A67 

A68 

A69 

A70 

A71 000362 

A72 

A73 

A7A 

A75 

A76 

A77 

A78 

A79 

ABO 

A81 

A82 00036A 

A83 

ASA 

ASS 

A86 

AS7 

ASS 

AS9 

A90 

A91 

A92 

A93 

A9A 

A95 

A96 00036A 

A97 

A98 

A99 

500 

501 

502 

503 000366 

50A 0OOAO2 

505 00OA06 

506 000A10 

507 000A1A 

508 00OA2O 

509 000A2A 



MOVB U.8UF(R5),(R2) .'START FUNCTION 

.IFF 

MOV U.BUF(R5).(R2) .-START FUNCTION 

.ENDC 



CANCEL I/O OPERATION IS A NOP FOR FILE STRUCTURED DEVICES. 



DBCAN: RETURN 



;;;NOP FOR RP0A/05/06 



POUERFAIL IS HANDLED VIA THE DEVICE TIMEOUT FACILITY AND 
CAUSES NO IMMEDIATE ACTION ON THE UNIT. THE CURRENT TIMEOUT 
COUNT IS EXTENDED SO THAT IF THE UNIT WAS BUSY IT WILL HAVE 
SUFFICIENT TIME TO SPIN BACK UP. THE NEXT I/O REQUEST TO ANY 
UNIT WILL BE SUSPENDED FOR AT LEAST THE EXTENDED TIMEOUT UNLESS 
THE UNIT IS ALREADY READY. 



DBPWF; 



;POWERFAIL ENTRY POINT 



.IF DF PSSRFL 



50$: 
51$: 



TSTB 

BEQ 

MOVB 

MOVB 

BISB 

.ENDC 



RETURN 



S.STS(RA) 

51$ 

#A.S.STS(RA) 

#15.,S.CTM(RA) 

*US.SPU.U.STS(R5) 



IS THIS UNIT CURRENTLY BUSY? 
IF EQ NO 

WAIT A MAXIMUM OF ONE MINUTE 
15 SECONDS AT A TIME 
.-SET UNIT SPINNING UP 



.-WAIT FOR UNIT TO RESPOND 



**-$0BlNT-RH11-RP0A/05/06 DISK PACK CONTROLLER 
INTERRUPT HANDLER 



510 
511 
512 
513 



010A03 

01650A OOOOOOG 

016A02 OOOOOOG 

016A01 OOOOOOG 

012700 OOOOOOC 



INTSES DB,PR5.R$$JP1 

CALL $FORK 

MOV RA,R3 

MOV U.SCB(R5),RA 

MOV S.CSR(RA),R2 

MOV S.PKT(RA),R1 

MOV #IS.SUC8377,R0 



.IF DF D$$IAG 



:;SAVE REGISTERS AND SET PRIORITY 

;; CREATE A SYSTEM PROCESS 

COPY CONTROLLER INDEX 

GET ADDRESS OF SCB 

GET ADDRESS OF CSR 

GET I/O PACKET ADDRESS 

ASSUME SUCCESSFUL TRANSFER 



PB030 
PB030 
PB030 
PB030 
PB030 
PB030 
PB030 
PB030 
PB030 
PB030 
P6030 
PB030 
PB030 
PB030 
PB030 
PB030 
PB030 
PB030 
PB030 
PBQ30 
PB030 
PB030 
P6030 
PB030 
PB030 
PB030 
;**-9 



PB013 



•*•• I 14 •««« 



rzT 



DBDRV MACRO MHOS U-DEC-77 20:08 PAGE 2-9 



5U 

PI 




521 

522 000A30 

523 000A3A 
524 



527 

528 000436 

529 000AA2 



537 
538 

539 000444 

540 000450 

541 000456 

542 000460 

543 000464 

544 000470 

545 000476 

546 000500 

547 000504 

548 000510 

549 000512 

550 000520 

551 000522 

552 000530 

553 000532 
554 

555 
556 
557 

558 000534 

559 000540 

560 000546 

561 000550 

562 000556 
563 

564 

565 

566 

567 000560 

568 

569 

570 



032712 
001437 



032712 
001463 



000040 



060000 



012700 
032762 
001055 
012700 
016401 
132761 
001045 
016201 
032701 
001040 
032762 
001034 
032762 
001017 
000452 



OOOOOOC 
004000 000014 

OOOOOOC 
OOOOOOG 
OOOOOOC 000012 

000014 
043007 

014000 000010 

163400 000010 



012700 OOOOOOC 55$; 

022763 000024' 000004* 

001421 

032762 040000 000012 

001004 



000167 177444 



56S: 



BITB 
BNE 


#IQ.UMD.I 
S8S 


.FCN(RI) .-DIAGNOSTIC FUNCTION EXECUTED? 
;IF NE YES 




.ENDC 










.IF DF 


RSSJPO 








BIT 
BEQ 


#40. (R2) 
55» 




.•OFFSET OR RTC FUNCTION? 
;IF EQ YES 




.ENDC 










BIT 
BEQ 


#TRE!MCPE 
6SS 


,(R2) 


.-ANY ERRORS? 
:IF EQ NO 


; P8013 
;**-1 


• IF DF 


ESSDVC 








CALL 


SDVERR 




;L0G DEVICE ERROR 




.ENDC 











NOV #IE. WLKK377.ro .-ASSUME WRITE LOCK ERROR 

BIT #WLE.RPER1(R2) .WRITE LOCK ERROR? 

BNE 70$ .-IF NE YES 

NOV #IE.VERt377,R0 .ASSUME UNRECOVERABLE ERROR 

MOV S.PKT(R4),R1 .-GET I/O PACKET ADDRESS 

BITB «ia.X.I.FCN(R1) .-INHIBIT RETRIES? 

BNE 67$ .-IF NE YES 

MOV RPER1(R2).R1 ;6ET CONTENTS OF ERROR REGISTER 

BIT «UNS!IAE!A0E!RMR!ILR!ILF.R1 .-HARD liRROR? 

BNE 70$ :IF NE YES 

BIT «NED!NEM.RPCS2(R2) .-HARD ERROR? 

BNE 70$ .-IF NE YES 

BIT #DLT!WCE!UPE!PGE!MXF!H0PE.RPCS2(R2) .-CONTROLLER ERROR? 

BNE 60$ .-IF NE YES. RETRY OPERATION 

BR 100$ : 



.IF DF R$$JPO 



; PB014 
.-••-1 



PB014 
**-1 

PB014 

P6